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

Function captureOutput

apps/kimi-code/test/cli/update/preflight.test.ts:176–196  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

174}
175
176function captureOutput(): {
177 stdout: string[];
178 stderr: string[];
179 options: {
180 stdout: { write(chunk: string): boolean };
181 stderr: { write(chunk: string): boolean };
182 isTTY: boolean;
183 };
184} {
185 const stdout: string[] = [];
186 const stderr: string[] = [];
187 return {
188 stdout,
189 stderr,
190 options: {
191 stdout: { write: (chunk: string) => { stdout.push(chunk); return true; } },
192 stderr: { write: (chunk: string) => { stderr.push(chunk); return true; } },
193 isTTY: true,
194 },
195 };
196}
197
198type TestLogFn = ReturnType<typeof vi.fn<(message: string, payload?: unknown) => void>>;
199

Callers 1

preflight.test.tsFile · 0.70

Calls 1

pushMethod · 0.45

Tested by

no test coverage detected