| 166 | } |
| 167 | |
| 168 | function processThatNeverExits(): KaosProcess { |
| 169 | const stdout = new PassThrough(); |
| 170 | const stderr = new PassThrough(); |
| 171 | return { |
| 172 | stdin: { end: vi.fn(), write: vi.fn() } as unknown as Writable, |
| 173 | stdout, |
| 174 | stderr, |
| 175 | pid: 126, |
| 176 | exitCode: null, |
| 177 | wait: vi.fn(async () => new Promise<number>(() => {})), |
| 178 | kill: vi.fn(async () => {}), |
| 179 | dispose: vi.fn(async () => { |
| 180 | stdout.destroy(); |
| 181 | stderr.destroy(); |
| 182 | }), |
| 183 | }; |
| 184 | } |
| 185 | |
| 186 | function processWithStreamError(options: { |
| 187 | readonly stdoutError?: Error; |