mirror of
https://github.com/openclaw/openclaw.git
synced 2026-05-06 15:10:52 +00:00
test: share execFile builtin mock
This commit is contained in:
@@ -49,3 +49,11 @@ export async function mockNodeChildProcessSpawnSync(
|
||||
spawnSync: (...args: unknown[]) => spawnSync(...args),
|
||||
} as Partial<typeof import("node:child_process")>);
|
||||
}
|
||||
|
||||
export async function mockNodeChildProcessExecFile(
|
||||
execFile: typeof import("node:child_process").execFile,
|
||||
): Promise<typeof import("node:child_process")> {
|
||||
return mockNodeBuiltinModule(() => import("node:child_process"), {
|
||||
execFile,
|
||||
} as Partial<typeof import("node:child_process")>);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user