test: fix setup and config typing drift

This commit is contained in:
Peter Steinberger
2026-04-07 12:47:18 +01:00
parent af8712fff1
commit 7a2a594044
3 changed files with 4 additions and 5 deletions

View File

@@ -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,
});
}
},

View File

@@ -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 () => {

View File

@@ -17,7 +17,7 @@ function expectSchemaInvalidIssuePath(
value: unknown,
) =>
| { success: true }
| { success: false; error: { issues: Array<{ path?: Array<string | number> }> } };
| { success: false; error: { issues: Array<{ path?: Array<PropertyKey> }> } };
},
config: unknown,
expectedPath: string,