Skip to content

Commit

Permalink
Fixes failing AndroidSdkTools tests
Browse files Browse the repository at this point in the history
  • Loading branch information
andreban committed Apr 27, 2020
1 parent 86bd38b commit 1269dfc
Showing 1 changed file with 8 additions and 5 deletions.
13 changes: 8 additions & 5 deletions packages/core/src/spec/lib/androidSdk/AndroidSdkToolsSpec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -91,11 +91,14 @@ describe('AndroidSdkTools', () => {
describe('#installBuildTools', () => {
const tests = [
{platform: 'linux',
expectedAndroidHome: '/home/user/android-sdk/tools/bin/sdkmanager'},
expectedAndroidHome: '/home/user/android-sdk/',
expectedCwd: '/home/user/android-sdk/tools/bin/sdkmanager'},
{platform: 'darwin',
expectedAndroidHome: '/home/user/android-sdk/tools/bin/sdkmanager'},
expectedAndroidHome: '/home/user/android-sdk/',
expectedCwd: '/home/user/android-sdk/tools/bin/sdkmanager'},
{platform: 'win32',
expectedAndroidHome: 'C:\\Users\\user\\android-sdk\\tools\\bin\\sdkmanager'},
expectedAndroidHome: 'C:\\Users\\user\\android-sdk\\',
expectedCwd: 'C:\\Users\\user\\android-sdk\\tools\\bin\\sdkmanager'},
];

tests.forEach((test) => {
Expand All @@ -107,8 +110,8 @@ describe('AndroidSdkTools', () => {
spyOn(util, 'execInteractive').and.stub();
androidSdkTools.installBuildTools();
expect(util.execInteractive).toHaveBeenCalledWith(
test.expectedAndroidHome,
['--install', '"build-tools;29.0.2"'],
test.expectedCwd,
['--install', '"build-tools;29.0.2"', `--sdk_root="${test.expectedAndroidHome}"`],
androidSdkTools.getEnv());
});
});
Expand Down

0 comments on commit 1269dfc

Please sign in to comment.