( predicate: () => boolean, message: string, timeoutMs = 1500, )
| 43 | } |
| 44 | |
| 45 | async function waitFor( |
| 46 | predicate: () => boolean, |
| 47 | message: string, |
| 48 | timeoutMs = 1500, |
| 49 | ): Promise<void> { |
| 50 | const deadline = Date.now() + timeoutMs |
| 51 | while (Date.now() < deadline) { |
| 52 | if (predicate()) return |
| 53 | await Bun.sleep(10) |
| 54 | } |
| 55 | throw new Error(message) |
| 56 | } |
| 57 | |
| 58 | function TallMainScreenHarness({ |
| 59 | suffix = '', |
no test coverage detected