(stdout: FakeOutput)
| 65 | } |
| 66 | |
| 67 | function captureWrites(stdout: FakeOutput): string[] { |
| 68 | const chunks: string[] = [] |
| 69 | const write = stdout.write.bind(stdout) |
| 70 | stdout.write = ((chunk: unknown, ...args: unknown[]) => { |
| 71 | chunks.push(String(chunk)) |
| 72 | return write(chunk as never, ...(args as [])) |
| 73 | }) as FakeOutput['write'] |
| 74 | return chunks |
| 75 | } |
| 76 | |
| 77 | async function waitFor( |
| 78 | predicate: () => boolean, |
no test coverage detected