Skip to content

Commit 050c581

Browse files
committed
Added timeout to wait for emulators
1 parent c351fdb commit 050c581

File tree

1 file changed

+10
-1
lines changed

1 file changed

+10
-1
lines changed

test/waitForEmulator.ts

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,4 +9,13 @@ async function waitForEmulators(): Promise<void> {
99
});
1010
}
1111

12-
void waitForEmulators();
12+
async function waitForEmulatorsMaxTimeout(timeout: number): Promise<void> {
13+
return new Promise((resolve, reject) => {
14+
waitForEmulators()
15+
.then(resolve)
16+
.catch(reject);
17+
setTimeout(reject, timeout);
18+
});
19+
}
20+
21+
void waitForEmulatorsMaxTimeout(30000);

0 commit comments

Comments
 (0)