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

Function mockSpawnExit

apps/kimi-code/test/cli/update/preflight.test.ts:214–220  ·  view source on GitHub ↗
(code: number, signal: NodeJS.Signals | null = null)

Source from the content-addressed store, hash-verified

212}
213
214function 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
222async function flushBackgroundInstall(): Promise<void> {
223 await new Promise<void>((resolve) => {

Callers 1

preflight.test.tsFile · 0.85

Calls 1

emitMethod · 0.45

Tested by

no test coverage detected