(config: WaitConfig, durationInMs?: number)
| 4 | }; |
| 5 | |
| 6 | export function wait(config: WaitConfig, durationInMs?: number) { |
| 7 | const delay = durationInMs ?? config.delay; |
| 8 | if (typeof delay !== 'number' || delay == null) { |
| 9 | return; |
| 10 | } |
| 11 | |
| 12 | return Promise.all([ |
| 13 | new Promise<void>((resolve) => globalThis.setTimeout(() => resolve(), delay)), |
| 14 | config.advanceTimers(delay), |
| 15 | ]); |
| 16 | } |
no outgoing calls
no test coverage detected
searching dependent graphs…