Skip to content

Commit

Permalink
fix: start emulator options
Browse files Browse the repository at this point in the history
  • Loading branch information
wtto00 committed Sep 21, 2023
1 parent 08e15ef commit 968857b
Show file tree
Hide file tree
Showing 6 changed files with 332 additions and 9 deletions.
3 changes: 2 additions & 1 deletion .eslintrc.json
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@
"indent": ["error", 2],
"linebreak-style": ["error", "unix"],
"quotes": ["error", "single"],
"semi": ["error", "always"]
"semi": ["error", "always"],
"@typescript-eslint/ban-types": "off"
}
}
2 changes: 0 additions & 2 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -64,8 +64,6 @@ jobs:

- name: Setup Android SDK
uses: amyu/[email protected]
with:
cache-disabled: true

- name: Run tests 👩🏽‍💻
run: npm run test
9 changes: 8 additions & 1 deletion spec/afterStart.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,14 @@ beforeAll(async () => {
} else {
avdName = avds[0].Name;
}
const res = await android.start(avdName);
const res = await android.start({
avd: avdName,
verbose: true,
noaudio: true,
noBootAnim: true,
noSnapshot: true,
noWindow: true
});
emulatorId = res.id;
if (emulatorId) {
await android.ensureReady(emulatorId);
Expand Down
9 changes: 8 additions & 1 deletion spec/start.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,14 @@ describe('start', () => {

test('start a non-existent AVD.', async () => {
await expect(async () => {
await android.start(`${Math.random()}`);
await android.start({
verbose: true,
avd: `${Math.random()}`,
noaudio: true,
noBootAnim: true,
noSnapshot: true,
noWindow: true
});
}).rejects.toThrow(/Android emulator version/);
});
});
Loading

0 comments on commit 968857b

Please sign in to comment.