Skip to content
Permalink
Browse files
fix: unit-test failure (#1184)
  • Loading branch information
erisu committed Mar 30, 2021
1 parent cb1cf4d commit 6dcd67a902d307ef5c9220824d6c3ed682f7f0c4
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 10 deletions.
@@ -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';
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_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';
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', () => {
@@ -826,17 +826,17 @@ describe('prepare', () => {
api = new Api();
});

it('runs without arguments', () => {
expectAsync(
it('runs without arguments', async () => {
await expectAsync(
api.prepare(cordovaProject, options).then(() => {
expect(gradlePropertiesParserSpy).toHaveBeenCalledWith({});
})
).toBeResolved();
});

it('runs with jvmargs', () => {
it('runs with jvmargs', async () => {
options.options.argv = ['--jvmargs=-Xmx=4096m'];
expectAsync(
await expectAsync(
api.prepare(cordovaProject, options).then(() => {
expect(gradlePropertiesParserSpy).toHaveBeenCalledWith({
'org.gradle.jvmargs': '-Xmx=4096m'

0 comments on commit 6dcd67a

Please sign in to comment.