test(lobster): preserve execFile in child_process mock
This commit is contained in:
parent
53d10f8688
commit
1c8ae978d2
@ -17,9 +17,13 @@ const spawnState = vi.hoisted(() => ({
|
||||
spawn: vi.fn(),
|
||||
}));
|
||||
|
||||
vi.mock("node:child_process", () => ({
|
||||
spawn: (...args: unknown[]) => spawnState.spawn(...args),
|
||||
}));
|
||||
vi.mock("node:child_process", async (importOriginal) => {
|
||||
const actual = await importOriginal<typeof import("node:child_process")>();
|
||||
return {
|
||||
...actual,
|
||||
spawn: (...args: unknown[]) => spawnState.spawn(...args),
|
||||
};
|
||||
});
|
||||
|
||||
let createLobsterTool: typeof import("./lobster-tool.js").createLobsterTool;
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user