mirror of
https://github.com/apache/cordova-android.git
synced 2025-03-16 00:11:03 +08:00
fix: unit-test failure (#1184)
This commit is contained in:
parent
cb1cf4dc8e
commit
6dcd67a902
@ -255,20 +255,20 @@ describe('check_reqs', function () {
|
|||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
|
||||||
it('with ANDROID_SDK_ROOT / without ANDROID_HOME', () => {
|
it('with ANDROID_SDK_ROOT / without ANDROID_HOME', async () => {
|
||||||
process.env.ANDROID_SDK_ROOT = '/android/sdk/root';
|
process.env.ANDROID_SDK_ROOT = '/android/sdk/root';
|
||||||
expectAsync(check_reqs.check_gradle()).toBeResolvedTo('/android/sdk/root/bin/gradle');
|
await expectAsync(check_reqs.check_gradle()).toBeResolvedTo('/android/sdk/root/bin/gradle');
|
||||||
});
|
});
|
||||||
|
|
||||||
it('with ANDROID_SDK_ROOT / with ANDROID_HOME', () => {
|
it('with ANDROID_SDK_ROOT / with ANDROID_HOME', async () => {
|
||||||
process.env.ANDROID_SDK_ROOT = '/android/sdk/root';
|
process.env.ANDROID_SDK_ROOT = '/android/sdk/root';
|
||||||
process.env.ANDROID_HOME = '/android/sdk/home';
|
process.env.ANDROID_HOME = '/android/sdk/home';
|
||||||
expectAsync(check_reqs.check_gradle()).toBeResolvedTo('/android/sdk/root/bin/gradle');
|
await expectAsync(check_reqs.check_gradle()).toBeResolvedTo('/android/sdk/root/bin/gradle');
|
||||||
});
|
});
|
||||||
|
|
||||||
it('without ANDROID_SDK_ROOT / with ANDROID_HOME', () => {
|
it('without ANDROID_SDK_ROOT / with ANDROID_HOME', async () => {
|
||||||
process.env.ANDROID_HOME = '/android/sdk/home';
|
process.env.ANDROID_HOME = '/android/sdk/home';
|
||||||
expectAsync(check_reqs.check_gradle()).toBeResolvedTo('/android/sdk/home/bin/gradle');
|
await expectAsync(check_reqs.check_gradle()).toBeResolvedTo('/android/sdk/home/bin/gradle');
|
||||||
});
|
});
|
||||||
|
|
||||||
it('without ANDROID_SDK_ROOT / without ANDROID_HOME', () => {
|
it('without ANDROID_SDK_ROOT / without ANDROID_HOME', () => {
|
||||||
|
@ -826,17 +826,17 @@ describe('prepare', () => {
|
|||||||
api = new Api();
|
api = new Api();
|
||||||
});
|
});
|
||||||
|
|
||||||
it('runs without arguments', () => {
|
it('runs without arguments', async () => {
|
||||||
expectAsync(
|
await expectAsync(
|
||||||
api.prepare(cordovaProject, options).then(() => {
|
api.prepare(cordovaProject, options).then(() => {
|
||||||
expect(gradlePropertiesParserSpy).toHaveBeenCalledWith({});
|
expect(gradlePropertiesParserSpy).toHaveBeenCalledWith({});
|
||||||
})
|
})
|
||||||
).toBeResolved();
|
).toBeResolved();
|
||||||
});
|
});
|
||||||
|
|
||||||
it('runs with jvmargs', () => {
|
it('runs with jvmargs', async () => {
|
||||||
options.options.argv = ['--jvmargs=-Xmx=4096m'];
|
options.options.argv = ['--jvmargs=-Xmx=4096m'];
|
||||||
expectAsync(
|
await expectAsync(
|
||||||
api.prepare(cordovaProject, options).then(() => {
|
api.prepare(cordovaProject, options).then(() => {
|
||||||
expect(gradlePropertiesParserSpy).toHaveBeenCalledWith({
|
expect(gradlePropertiesParserSpy).toHaveBeenCalledWith({
|
||||||
'org.gradle.jvmargs': '-Xmx=4096m'
|
'org.gradle.jvmargs': '-Xmx=4096m'
|
||||||
|
Loading…
x
Reference in New Issue
Block a user