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

Function createProcess

packages/agent-core/test/agent/harness/agent.ts:123–134  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

121
122export function createCommandKaos(stdout: string): Kaos {
123 function createProcess(): KaosProcess {
124 return {
125 stdin: { write: vi.fn(), end: vi.fn() } as unknown as Writable,
126 stdout: Readable.from([stdout]),
127 stderr: Readable.from(['']),
128 pid: 42,
129 exitCode: 0,
130 wait: vi.fn().mockResolvedValue(0),
131 kill: vi.fn().mockResolvedValue(undefined),
132 dispose: vi.fn().mockResolvedValue(undefined),
133 };
134 }
135
136 return createFakeKaos({
137 execWithEnv: vi.fn().mockImplementation(async () => createProcess()),

Callers 1

createCommandKaosFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected