test: assert matrix action schema fields · openclaw/openclaw@ab12985
shakkernerd
·
2026-05-11
·
via Recent Commits to openclaw:main
| Original file line number | Diff line number | Diff line change |
|---|
@@ -95,11 +95,17 @@ describe("matrixMessageActions", () => {
|
95 | 95 | expect(discovery.mediaSourceParams).toEqual({ |
96 | 96 | "set-profile": ["avatarUrl", "avatarPath"], |
97 | 97 | }); |
98 | | -expect(properties).toMatchObject({ |
99 | | -displayName: expect.any(Object), |
100 | | -avatarUrl: expect.any(Object), |
101 | | -avatarPath: expect.any(Object), |
102 | | -}); |
| 98 | +expect(Object.keys(properties).sort()).toEqual([ |
| 99 | +"avatarPath", |
| 100 | +"avatarUrl", |
| 101 | +"avatar_path", |
| 102 | +"avatar_url", |
| 103 | +"displayName", |
| 104 | +"display_name", |
| 105 | +]); |
| 106 | +expect(properties.displayName).toHaveProperty("type", "string"); |
| 107 | +expect(properties.avatarUrl).toHaveProperty("type", "string"); |
| 108 | +expect(properties.avatarPath).toHaveProperty("type", "string"); |
103 | 109 | }); |
104 | 110 | |
105 | 111 | it("hides self-profile updates for non-owner discovery", () => { |
|
此内容由惯性聚合(RSS阅读器)自动聚合整理,仅供阅读参考。 原文来自 — 版权归原作者所有。