mirror of
https://github.com/moltbot/moltbot.git
synced 2026-05-13 15:47:28 +00:00
test: tighten clickclack account assertions
This commit is contained in:
@@ -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",
|
||||
});
|
||||
});
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user