The opener is async (detached); give it a moment before concluding.
(timeoutMs: number)
| 241 | |
| 242 | /** The opener is async (detached); give it a moment before concluding. */ |
| 243 | async function waitForMarker(timeoutMs: number): Promise<string | null> { |
| 244 | const deadline = Date.now() + timeoutMs; |
| 245 | for (;;) { |
| 246 | if (fs.existsSync(markerFile())) return fs.readFileSync(markerFile(), 'utf-8'); |
| 247 | if (Date.now() > deadline) return null; |
| 248 | await new Promise((r) => setTimeout(r, 50)); |
| 249 | } |
| 250 | } |
| 251 | |
| 252 | it('serves the viewer and prints where it is', async () => { |
| 253 | const viewer = await startViewer(['--no-open', '--port', '0', projectDir], {}); |
no test coverage detected