(pid: number, timeoutMs: number)
| 26 | } |
| 27 | |
| 28 | function waitForExit(pid: number, timeoutMs: number): Promise<boolean> { |
| 29 | return new Promise((resolve) => { |
| 30 | const start = Date.now(); |
| 31 | const tick = () => { |
| 32 | if (!isAlive(pid)) return resolve(true); |
| 33 | if (Date.now() - start > timeoutMs) return resolve(false); |
| 34 | setTimeout(tick, 100); |
| 35 | }; |
| 36 | tick(); |
| 37 | }); |
| 38 | } |
| 39 | |
| 40 | describe.skipIf(process.platform === 'win32')('index/init orphan supervision (#999)', () => { |
| 41 | let wrapper: ChildProcessWithoutNullStreams | null = null; |
no test coverage detected