Skip to content

Commit

Permalink
chore: ci
Browse files Browse the repository at this point in the history
  • Loading branch information
wtto00 committed Sep 15, 2023
1 parent 7414de2 commit bf8bd10
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 1 deletion.
5 changes: 4 additions & 1 deletion spec/afterStart.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,11 @@ describe("after start a emulator", () => {
if (avds.length === 0) {
avdName = `TestCreate_${Math.random()}`;
const images = (await android.listImages()).filter((item) => item.vendor === "default");
console.log("images");
console.log(images);
if (images.length === 0) return;
await android.createAVD({ name: avdName, package: images[images.length - 1].name, force: false });
const image = images[images.length - 1].name;
await android.createAVD({ name: avdName, package: image, force: false });
} else {
avdName = avds[0].Name;
}
Expand Down
3 changes: 3 additions & 0 deletions src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -226,6 +226,9 @@ class Android {
* @param name name of AVD
*/
async createAVD(options: CreateAVDOptions) {
if (options.package) {
await this.sdkmanager(options.package);
}
const cmdParams = Object.keys(options).reduce((prev, curr) => {
const val = options[curr as keyof CreateAVDOptions];
if (typeof val === "boolean") {
Expand Down

0 comments on commit bf8bd10

Please sign in to comment.