(readOutput: () => string)
| 486 | } |
| 487 | |
| 488 | async function waitForReady(readOutput: () => string) { |
| 489 | const start = Date.now(); |
| 490 | while (Date.now() - start < 60_000) { |
| 491 | const output = stripAnsi(readOutput()); |
| 492 | if (output.includes('Ready! Available at')) return; |
| 493 | if (output.includes('Command failed') || output.includes('Error:')) { |
| 494 | throw new Error(output); |
| 495 | } |
| 496 | await new Promise(resolve => setTimeout(resolve, 100)); |
| 497 | } |
| 498 | |
| 499 | throw new Error(`Timed out waiting for vc dev:\n${readOutput()}`); |
| 500 | } |
no test coverage detected