( stream: NodeJS.ReadableStream, caseName: string, label: 'stdout' | 'stderr', reportDir: string, )
| 95 | } |
| 96 | |
| 97 | function captureLines( |
| 98 | stream: NodeJS.ReadableStream, |
| 99 | caseName: string, |
| 100 | label: 'stdout' | 'stderr', |
| 101 | reportDir: string, |
| 102 | ): void { |
| 103 | const lines = createInterface({ input: stream }); |
| 104 | lines.on('line', (line) => { |
| 105 | const output = label === 'stderr' ? process.stderr : process.stdout; |
| 106 | output.write(`${line}\n`); |
| 107 | recordReportEvent({ kind: 'log', caseName, label, value: line }, { reportDir }); |
| 108 | }); |
| 109 | } |
| 110 | |
| 111 | try { |
| 112 | await main(); |
no test coverage detected