(code: number, signal: NodeJS.Signals | null = null)
| 212 | } |
| 213 | |
| 214 | function mockSpawnExit(code: number, signal: NodeJS.Signals | null = null): void { |
| 215 | mocks.spawn.mockImplementation(() => { |
| 216 | const child = Object.assign(new EventEmitter(), { unref: vi.fn() }); |
| 217 | queueMicrotask(() => { child.emit('exit', code, signal); }); |
| 218 | return child; |
| 219 | }); |
| 220 | } |
| 221 | |
| 222 | async function flushBackgroundInstall(): Promise<void> { |
| 223 | await new Promise<void>((resolve) => { |