(timeout: number)
| 11 | export type PromiseFunction = (...any: any[]) => Promise<any>; |
| 12 | |
| 13 | export async function sleep(timeout: number): Promise<number> { |
| 14 | return new Promise<number>((resolve) => { |
| 15 | setTimeout(() => resolve(timeout), timeout); |
| 16 | }); |
| 17 | } |
| 18 | |
| 19 | export async function waitForCondition( |
| 20 | condition: () => Promise<boolean>, |
no test coverage detected