| 587 | }); |
| 588 | |
| 589 | class FakeReapProcess implements HostReapProcess { |
| 590 | exitCodes: number[] = []; |
| 591 | private readonly listeners = new Map<string, Array<() => void>>(); |
| 592 | on(event: 'exit' | NodeJS.Signals, listener: () => void): void { |
| 593 | const arr = this.listeners.get(event) ?? []; |
| 594 | arr.push(listener); |
| 595 | this.listeners.set(event, arr); |
| 596 | } |
| 597 | exit(code?: number): void { |
| 598 | this.exitCodes.push(code ?? 0); |
| 599 | } |
| 600 | emit(event: 'exit' | NodeJS.Signals): void { |
| 601 | for (const listener of this.listeners.get(event) ?? []) listener(); |
| 602 | } |
| 603 | } |
| 604 | |
| 605 | function makeReapHandle(): { handle: PtyHostHandle; killCount: () => number } { |
| 606 | let count = 0; |
nothing calls this directly
no outgoing calls
no test coverage detected