MCPcopy Create free account
hub / github.com/MoonshotAI/kimi-code / mockProcessExit

Function mockProcessExit

apps/kimi-code/test/helpers/process.ts:9–13  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

7}
8
9export 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
15export function captureProcessWrite(stream: 'stdout' | 'stderr'): {
16 readonly chunks: string[];

Callers 1

run-shell.test.tsFile · 0.90

Calls

no outgoing calls

Tested by

no test coverage detected