(timeoutMs = 2000)
| 1527 | |
| 1528 | const preferencePath = privateSession.getAutoRetryPreferencePath(); |
| 1529 | const waitForPreferenceFile = async (timeoutMs = 2000): Promise<boolean> => { |
| 1530 | const start = Date.now(); |
| 1531 | while (Date.now() - start < timeoutMs) { |
| 1532 | if (await Bun.file(preferencePath).exists()) { |
| 1533 | return true; |
| 1534 | } |
| 1535 | await new Promise((resolve) => setTimeout(resolve, 10)); |
| 1536 | } |
| 1537 | return false; |
| 1538 | }; |
| 1539 | |
| 1540 | expect(await waitForPreferenceFile()).toBe(true); |
| 1541 |
no test coverage detected