test: trim more runtime partial mocks

This commit is contained in:
Peter Steinberger
2026-04-03 20:46:49 +01:00
parent f56a9f3b3b
commit 7db148706a
5 changed files with 15 additions and 10 deletions

View File

@@ -14,8 +14,10 @@ import { CRITICAL_THRESHOLD, GLOBAL_CIRCUIT_BREAKER_THRESHOLD } from "./tool-loo
import type { AnyAgentTool } from "./tools/common.js";
import { callGatewayTool } from "./tools/gateway.js";
vi.mock("../plugins/hook-runner-global.js", async (importOriginal) => {
const actual = await importOriginal<typeof import("../plugins/hook-runner-global.js")>();
vi.mock("../plugins/hook-runner-global.js", async () => {
const actual = await vi.importActual<typeof import("../plugins/hook-runner-global.js")>(
"../plugins/hook-runner-global.js",
);
return {
...actual,
getGlobalHookRunner: vi.fn(),