Skip to content

Commit

Permalink
ci: test
Browse files Browse the repository at this point in the history
  • Loading branch information
wtto00 committed May 10, 2024
1 parent 7318322 commit aa34647
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions spec/afterStart.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,12 +6,15 @@ const android = new Android({ debug: true });
let emulatorId = '';
beforeAll(async () => {
const avds = await android.listAVDs();
console.log('avds', avds);
let avdName = '';
if (avds.length === 0) {
avdName = `TestCreate_${Math.random().toString().substring(2)}`;
const images = (await android.listImages()).filter((item) => item.target === 'default' && item.arch === 'x86_64');
console.log('images', images);
if (images.length === 0) return;
await android.createAVD({ name: avdName, apiLevel: 31, force: false });
console.log('avds', avds);
} else {
avdName = avds[0].Name;
}
Expand Down

0 comments on commit aa34647

Please sign in to comment.