From 39a907d7f4a515a19d3867570cc0a0036ebe2684 Mon Sep 17 00:00:00 2001 From: Peter Steinberger Date: Thu, 23 Apr 2026 11:30:15 +0100 Subject: [PATCH] test(hooks): drop unobservable loader smoke --- src/hooks/loader.test.ts | 32 -------------------------------- 1 file changed, 32 deletions(-) diff --git a/src/hooks/loader.test.ts b/src/hooks/loader.test.ts index a8c313a3580..b66650c8857 100644 --- a/src/hooks/loader.test.ts +++ b/src/hooks/loader.test.ts @@ -381,38 +381,6 @@ describe("loader", () => { expect(count).toBe(1); }); - it("should actually call the loaded handler", async () => { - // Create a handler that we can verify was called - const handlerCode = ` - let callCount = 0; - export default async function(event) { - callCount++; - } - export function getCallCount() { - return callCount; - } - `; - const handlerPath = await writeHandlerModule("callable-handler.js", handlerCode); - - const cfg = createEnabledHooksConfig([ - { - event: "command:new", - module: path.basename(handlerPath), - }, - ]); - - await loadInternalHooks(cfg, tmpDir); - - // Trigger the hook - const event = createInternalHookEvent("command", "new", "test-session"); - await triggerInternalHook(event); - - // The handler should have been called, but we can't directly verify - // the call count from this context without more complex test infrastructure - // This test mainly verifies that loading and triggering doesn't crash - expect(getRegisteredEventKeys()).toContain("command:new"); - }); - it("keeps workspace hooks disabled by default until explicitly enabled", async () => { await writeDiscoveredHook({ hookName: "workspace-hook" });