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

Function makeDeps

apps/kimi-code/test/cli/doctor.test.ts:25–50  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

23});
24
25function makeDeps(): {
26 deps: DoctorDeps;
27 stdout: string[];
28 stderr: string[];
29 exitCodes: number[];
30} {
31 const stdout: string[] = [];
32 const stderr: string[] = [];
33 const exitCodes: number[] = [];
34 return {
35 deps: {
36 cwd: () => dir,
37 defaultConfigPath: () => join(dir, 'config.toml'),
38 defaultTuiConfigPath: () => join(dir, 'tui.toml'),
39 stdout: { write: (chunk) => stdout.push(chunk) > 0 },
40 stderr: { write: (chunk) => stderr.push(chunk) > 0 },
41 exit: (code) => {
42 exitCodes.push(code);
43 throw new Error(`exit ${String(code)}`);
44 },
45 },
46 stdout,
47 stderr,
48 exitCodes,
49 };
50}
51
52async function writeValidConfig(path = join(dir, 'config.toml')): Promise<void> {
53 await writeFile(

Callers 1

doctor.test.tsFile · 0.70

Calls 1

pushMethod · 0.45

Tested by

no test coverage detected