test: dedupe core test teardown paths

This commit is contained in:
Peter Steinberger
2026-04-03 07:14:44 +01:00
parent b66197f932
commit 051b5ddafe
14 changed files with 8 additions and 49 deletions

View File

@@ -18,13 +18,6 @@ describe("compaction hook wiring", () => {
let handleAutoCompactionEnd: typeof import("../agents/pi-embedded-subscribe.handlers.compaction.js").handleAutoCompactionEnd;
beforeAll(async () => {
hookMocks.runner.hasHooks.mockClear();
hookMocks.runner.hasHooks.mockReturnValue(false);
hookMocks.runner.runBeforeCompaction.mockClear();
hookMocks.runner.runBeforeCompaction.mockResolvedValue(undefined);
hookMocks.runner.runAfterCompaction.mockClear();
hookMocks.runner.runAfterCompaction.mockResolvedValue(undefined);
hookMocks.emitAgentEvent.mockClear();
vi.doMock("../plugins/hook-runner-global.js", () => ({
getGlobalHookRunner: () => hookMocks.runner,
}));