test: tighten clickclack account assertions

This commit is contained in:
Shakker
2026-05-11 07:51:23 +01:00
parent 94c7882713
commit e149a23a3b

View File

@@ -25,10 +25,25 @@ describe("ClickClack account resolution", () => {
accountId: "service",
env: { CLICKCLACK_SERVICE_TOKEN: " ccb_live " },
}),
).toMatchObject({
).toEqual({
allowFrom: ["*"],
accountId: "service",
baseUrl: "https://app.clickclack.chat",
config: {
allowFrom: ["*"],
baseUrl: "https://app.clickclack.chat",
enabled: true,
token: { source: "env", provider: "default", id: "CLICKCLACK_SERVICE_TOKEN" },
workspace: "wsp_1",
},
configured: true,
defaultTo: "channel:general",
enabled: true,
reconnectMs: 1_500,
replyMode: "agent",
senderIsOwner: false,
token: "ccb_live",
workspace: "wsp_1",
});
});
@@ -53,13 +68,33 @@ describe("ClickClack account resolution", () => {
},
} satisfies CoreConfig;
expect(resolveClickClackAccount({ cfg, accountId: "peter" })).toMatchObject({
expect(resolveClickClackAccount({ cfg, accountId: "peter" })).toEqual({
allowFrom: ["*"],
accountId: "peter",
agentId: "peter-bot",
replyMode: "model",
baseUrl: "https://app.clickclack.chat",
config: {
agentId: "peter-bot",
allowFrom: ["*"],
baseUrl: "https://app.clickclack.chat",
enabled: true,
model: "openai/gpt-5.4-mini",
replyMode: "model",
senderIsOwner: true,
token: "ccb_peter",
toolsAllow: ["web_search"],
workspace: "wsp_1",
},
configured: true,
defaultTo: "channel:general",
enabled: true,
model: "openai/gpt-5.4-mini",
reconnectMs: 1_500,
replyMode: "model",
senderIsOwner: true,
token: "ccb_peter",
toolsAllow: ["web_search"],
workspace: "wsp_1",
});
});
});