test: tighten imessage action discovery assertions · openclaw/openclaw@11e275b
shakkernerd
·
2026-05-11
·
via Recent Commits to openclaw:main
| Original file line number | Diff line number | Diff line change |
|---|
@@ -35,11 +35,18 @@ describe("iMessage message-tool artifact", () => {
|
35 | 35 | currentChannelId: "chat_id:1", |
36 | 36 | }); |
37 | 37 | |
38 | | -expect(discovery?.actions).toEqual( |
39 | | -expect.arrayContaining(["react", "reply", "sendWithEffect", "upload-file"]), |
40 | | -); |
41 | | -expect(discovery?.actions).not.toContain("edit"); |
42 | | -expect(discovery?.actions).not.toContain("sendAttachment"); |
| 38 | +expect(discovery?.actions).toStrictEqual([ |
| 39 | +"react", |
| 40 | +"unsend", |
| 41 | +"reply", |
| 42 | +"sendWithEffect", |
| 43 | +"renameGroup", |
| 44 | +"setGroupIcon", |
| 45 | +"addParticipant", |
| 46 | +"removeParticipant", |
| 47 | +"leaveGroup", |
| 48 | +"upload-file", |
| 49 | +]); |
43 | 50 | }); |
44 | 51 | |
45 | 52 | it("hides private actions when cached bridge status is unavailable", () => { |
|
| Original file line number | Diff line number | Diff line change |
|---|
@@ -235,8 +235,18 @@ describe("createIMessageTestPlugin", () => {
|
235 | 235 | it("exposes seeded private API actions for binding contract tests", () => { |
236 | 236 | const plugin = createIMessageTestPlugin(); |
237 | 237 | |
238 | | -expect(plugin.actions?.describeMessageTool({} as never)?.actions).toEqual( |
239 | | -expect.arrayContaining(["react", "edit", "unsend", "reply", "sendWithEffect", "upload-file"]), |
240 | | -); |
| 238 | +expect(plugin.actions?.describeMessageTool({} as never)?.actions).toStrictEqual([ |
| 239 | +"react", |
| 240 | +"edit", |
| 241 | +"unsend", |
| 242 | +"reply", |
| 243 | +"sendWithEffect", |
| 244 | +"upload-file", |
| 245 | +"renameGroup", |
| 246 | +"setGroupIcon", |
| 247 | +"addParticipant", |
| 248 | +"removeParticipant", |
| 249 | +"leaveGroup", |
| 250 | +]); |
241 | 251 | }); |
242 | 252 | }); |
此内容由惯性聚合(RSS阅读器)自动聚合整理,仅供阅读参考。 原文来自 — 版权归原作者所有。