mirror of
https://github.com/openclaw/openclaw.git
synced 2026-04-12 09:41:11 +00:00
test: fix setup and config typing drift
This commit is contained in:
@@ -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,
|
||||
});
|
||||
}
|
||||
},
|
||||
|
||||
@@ -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 () => {
|
||||
|
||||
@@ -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,
|
||||
|
||||
Reference in New Issue
Block a user