MCPcopy
hub / github.com/lobehub/lobehub / callExecFile

Function callExecFile

packages/heterogeneous-agents/src/spawn/cliSpawn.test.ts:34–42  ·  view source on GitHub ↗
(stdout: string)

Source from the content-addressed store, hash-verified

32const readFileMock = vi.mocked(fsPromises.readFile);
33
34const callExecFile = (stdout: string) => {
35 execFileMock.mockImplementationOnce(((...args: unknown[]) => {
36 const callback = [...args].reverse().find((arg) => typeof arg === 'function') as
37 | ((error: Error | null, stdout: string) => void)
38 | undefined;
39 callback?.(null, stdout);
40 return {} as childProcess.ChildProcess;
41 }) as typeof childProcess.execFile);
42};
43
44const existingPaths = (...paths: string[]) => {
45 const normalizedPaths = new Set(paths.map((filePath) => filePath.toLowerCase()));

Callers 1

cliSpawn.test.tsFile · 0.70

Calls 1

findMethod · 0.80

Tested by

no test coverage detected