mirror of
https://github.com/apache/cordova-android.git
synced 2026-05-11 00:00:05 +08:00
fix(regression): Cannot read version of undefined caused by Java refactor (https://github.com/apache/cordova-android/pull/1130#discussion_r563597125) (#1185)
This commit is contained in:
@@ -56,6 +56,14 @@ describe('check_reqs', function () {
|
||||
|
||||
await expectAsync(check_reqs.check_java()).toBeRejectedWithError(CordovaError, /Requirements check failed for JDK 9999.9999.9999! Detected version: 1.8.0/);
|
||||
});
|
||||
|
||||
it('should return the version', async () => {
|
||||
check_reqs.__set__({
|
||||
java: { getVersion: async () => ({ version: '1.8.0' }) }
|
||||
});
|
||||
|
||||
await expectAsync(check_reqs.check_java()).toBeResolvedTo({ version: '1.8.0' });
|
||||
});
|
||||
});
|
||||
|
||||
describe('check_android', function () {
|
||||
|
||||
Reference in New Issue
Block a user