From 79b88224e1cbf80371fa275f7eb366a064af375d Mon Sep 17 00:00:00 2001 From: Peter Steinberger Date: Fri, 8 May 2026 12:41:07 +0100 Subject: [PATCH] test: clarify plugin registry cleanup --- src/plugins/http-registry.test.ts | 2 +- src/plugins/interactive.test.ts | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/plugins/http-registry.test.ts b/src/plugins/http-registry.test.ts index a6e30ea3320..6a1ef6e2cd6 100644 --- a/src/plugins/http-registry.test.ts +++ b/src/plugins/http-registry.test.ts @@ -121,7 +121,7 @@ describe("registerPluginHttpRoute", () => { expect(registry.httpRoutes).toHaveLength(0); expect(logs).toEqual(['plugin: webhook path missing for account "default"']); - expect(() => unregister()).not.toThrow(); + unregister(); }); it("replaces stale route on same path when replaceExisting=true", () => { diff --git a/src/plugins/interactive.test.ts b/src/plugins/interactive.test.ts index 8eb2eff706a..0d180fc0022 100644 --- a/src/plugins/interactive.test.ts +++ b/src/plugins/interactive.test.ts @@ -486,7 +486,7 @@ describe("plugin interactive handlers", () => { }; try { - expect(() => clearPluginInteractiveHandlers()).not.toThrow(); + clearPluginInteractiveHandlers(); const hydrated = globalStore[stateKey] as { interactiveHandlers?: Map; callbackDedupe?: { clear: () => void }; @@ -496,7 +496,7 @@ describe("plugin interactive handlers", () => { if (!hydrated.callbackDedupe) { throw new Error("expected hydrated callback dedupe"); } - expect(() => hydrated.callbackDedupe?.clear()).not.toThrow(); + hydrated.callbackDedupe.clear(); expect(hydrated.inflightCallbackDedupe).toBeInstanceOf(Set); const handler = vi.fn(async () => ({ handled: true }));