Skip to content

Commit 2fcb1f7

Browse files
steipetePeter Steinberger
andauthored
test(auto-reply): preserve plugin hook runner lifecycle exports (#117647)
Co-authored-by: Peter Steinberger <[email protected]>
1 parent 99f9c43 commit 2fcb1f7

1 file changed

Lines changed: 9 additions & 5 deletions

File tree

‎src/auto-reply/reply.directive.directive-behavior.e2e-mocks.ts‎

Lines changed: 9 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -130,11 +130,15 @@ vi.mock("../agents/auth-profiles/session-override.js", () => ({
130130
resolveSessionAuthProfileOverrideMock(...args),
131131
}));
132132

133-
vi.mock("../plugins/hook-runner-global.js", () => ({
134-
getGlobalHookRunner: () => undefined,
135-
initializeGlobalHookRunner: vi.fn(),
136-
resetGlobalHookRunner: vi.fn(),
137-
}));
133+
vi.mock("../plugins/hook-runner-global.js", async (importOriginal) => {
134+
const actual = await importOriginal<typeof import("../plugins/hook-runner-global.js")>();
135+
return {
136+
...actual,
137+
getGlobalHookRunner: () => undefined,
138+
initializeGlobalHookRunner: vi.fn(),
139+
resetGlobalHookRunner: vi.fn(),
140+
};
141+
});
138142

139143
vi.mock("./reply/agent-runner.runtime.js", () => ({
140144
runReplyAgent: (...args: unknown[]) => runReplyAgentMock(...args),

0 commit comments

Comments
 (0)