From 7a2a594044e546ffaacc7a7ef525b10e2fdaddab Mon Sep 17 00:00:00 2001 From: Peter Steinberger Date: Tue, 7 Apr 2026 12:47:18 +0100 Subject: [PATCH] test: fix setup and config typing drift --- extensions/mattermost/src/setup.test.ts | 3 +-- extensions/qqbot/src/setup.test.ts | 4 ++-- ....legacy-config-detection.rejects-routing-allowfrom.test.ts | 2 +- 3 files changed, 4 insertions(+), 5 deletions(-) diff --git a/extensions/mattermost/src/setup.test.ts b/extensions/mattermost/src/setup.test.ts index d07c0834d7b..1e37b92a939 100644 --- a/extensions/mattermost/src/setup.test.ts +++ b/extensions/mattermost/src/setup.test.ts @@ -77,9 +77,8 @@ describe("mattermost setup", () => { if (api.registrationMode === "full") { api.registerHttpRoute({ path: "/api/channels/mattermost/command", - method: "POST", auth: "plugin", - handler: async () => new Response(null, { status: 204 }), + handler: async () => true, }); } }, diff --git a/extensions/qqbot/src/setup.test.ts b/extensions/qqbot/src/setup.test.ts index ae3867e958d..a4a85c7a69e 100644 --- a/extensions/qqbot/src/setup.test.ts +++ b/extensions/qqbot/src/setup.test.ts @@ -105,8 +105,8 @@ describe("qqbot setup", () => { const account = qqbotSetupPlugin.config.resolveAccount?.(cfg, DEFAULT_ACCOUNT_ID); expect(account?.clientSecret).toBe(""); - expect(qqbotSetupPlugin.config.isConfigured?.(account, cfg)).toBe(true); - expect(qqbotSetupPlugin.config.describeAccount?.(account, cfg)?.configured).toBe(true); + expect(qqbotSetupPlugin.config.isConfigured?.(account)).toBe(true); + expect(qqbotSetupPlugin.config.describeAccount?.(account)?.configured).toBe(true); }); it("keeps the sibling credential when switching only AppSecret to env mode", async () => { diff --git a/src/config/config.legacy-config-detection.rejects-routing-allowfrom.test.ts b/src/config/config.legacy-config-detection.rejects-routing-allowfrom.test.ts index 37a5ebaa780..d739d0038e2 100644 --- a/src/config/config.legacy-config-detection.rejects-routing-allowfrom.test.ts +++ b/src/config/config.legacy-config-detection.rejects-routing-allowfrom.test.ts @@ -17,7 +17,7 @@ function expectSchemaInvalidIssuePath( value: unknown, ) => | { success: true } - | { success: false; error: { issues: Array<{ path?: Array }> } }; + | { success: false; error: { issues: Array<{ path?: Array }> } }; }, config: unknown, expectedPath: string,