()
| 7 | } |
| 8 | |
| 9 | export function mockProcessExit(): { mockRestore(): void } { |
| 10 | return vi.spyOn(process, 'exit').mockImplementation(((code?: string | number | null) => { |
| 11 | throw new ExitCalled(Number(code ?? 0)); |
| 12 | }) as never); |
| 13 | } |
| 14 | |
| 15 | export function captureProcessWrite(stream: 'stdout' | 'stderr'): { |
| 16 | readonly chunks: string[]; |