


































@@ -381,38 +381,6 @@ describe("loader", () => {
381381expect(count).toBe(1);
382382});
383383384-it("should actually call the loaded handler", async () => {
385-// Create a handler that we can verify was called
386-const handlerCode = `
387- let callCount = 0;
388- export default async function(event) {
389- callCount++;
390- }
391- export function getCallCount() {
392- return callCount;
393- }
394- `;
395-const handlerPath = await writeHandlerModule("callable-handler.js", handlerCode);
396-397-const cfg = createEnabledHooksConfig([
398-{
399-event: "command:new",
400-module: path.basename(handlerPath),
401-},
402-]);
403-404-await loadInternalHooks(cfg, tmpDir);
405-406-// Trigger the hook
407-const event = createInternalHookEvent("command", "new", "test-session");
408-await triggerInternalHook(event);
409-410-// The handler should have been called, but we can't directly verify
411-// the call count from this context without more complex test infrastructure
412-// This test mainly verifies that loading and triggering doesn't crash
413-expect(getRegisteredEventKeys()).toContain("command:new");
414-});
415-416384it("keeps workspace hooks disabled by default until explicitly enabled", async () => {
417385await writeDiscoveredHook({ hookName: "workspace-hook" });
418386此内容由惯性聚合(RSS阅读器)自动聚合整理,仅供阅读参考。 原文来自 — 版权归原作者所有。