(chunk: string)
| 237 | |
| 238 | let buffer = '' |
| 239 | const handleChunk = (chunk: string) => { |
| 240 | buffer += chunk |
| 241 | const lines = buffer.split('\n') |
| 242 | buffer = lines.pop() ?? '' |
| 243 | for (const line of lines) { |
| 244 | const event = parseJsonLine(line) |
| 245 | if (!event) continue |
| 246 | applyPiEvent(totals, event) |
| 247 | context.onEvent(event) |
| 248 | } |
| 249 | } |
| 250 | const piRun = await raceAbort( |
| 251 | runner.run(PI_SCRIPT, { |
| 252 | envs: { |
nothing calls this directly
no test coverage detected