

























@@ -147,11 +147,17 @@ describe("channelsCapabilitiesCommand", () => {
147147148148await channelsCapabilitiesCommand({ channel: "slack" }, runtime);
149149150-const output = logs.join("\n");
151-expect(output).toContain("Bot scopes");
152-expect(output).toContain("User scopes");
153-expect(output).toContain("chat:write");
154-expect(output).toContain("users:read");
150+expect(logs).toStrictEqual([
151+[
152+"slack:default",
153+"Support: chatTypes=direct",
154+"Actions: send, broadcast, poll",
155+"Bot: @openclaw",
156+"Team: team",
157+"Bot scopes (auth.scopes): chat:write",
158+"User scopes (auth.scopes): users:read",
159+].join("\n"),
160+]);
155161});
156162157163it("prints Teams Graph permission hints when present", async () => {
@@ -186,9 +192,15 @@ describe("channelsCapabilitiesCommand", () => {
186192187193await channelsCapabilitiesCommand({ channel: "msteams" }, runtime);
188194189-const output = logs.join("\n");
190-expect(output).toContain("ChannelMessage.Read.All (channel history)");
191-expect(output).toContain("Files.Read.All (files (OneDrive))");
195+expect(logs).toStrictEqual([
196+[
197+"msteams:default",
198+"Support: chatTypes=direct",
199+"Actions: send, broadcast, poll",
200+"App: app-id",
201+"Graph roles: ChannelMessage.Read.All (channel history), Files.Read.All (files (OneDrive))",
202+].join("\n"),
203+]);
192204});
193205194206it("installs an explicit optional channel before rendering capabilities", async () => {
@@ -229,6 +241,13 @@ describe("channelsCapabilitiesCommand", () => {
229241.calls as unknown as Array<[{ reason?: string }]>;
230242const refreshParams = refreshCalls[0]?.[0];
231243expect(refreshParams?.reason).toBe("source-changed");
232-expect(logs.join("\n")).toContain("Probe: linked");
244+expect(logs).toStrictEqual([
245+[
246+"whatsapp:default",
247+"Support: chatTypes=direct",
248+"Actions: send, broadcast, poll",
249+"Probe: linked",
250+].join("\n"),
251+]);
233252});
234253});
此内容由惯性聚合(RSS阅读器)自动聚合整理,仅供阅读参考。 原文来自 — 版权归原作者所有。