test: weave matrix message assertions · openclaw/openclaw@cee3228
shakkernerd
·
2026-05-13
·
via Recent Commits to openclaw:main
File tree
extensions/matrix/src/matrix
| Original file line number | Diff line number | Diff line change |
|---|
@@ -180,7 +180,7 @@ function sentContentAt(callIndex: number): Record<string, unknown> {
|
180 | 180 | } |
181 | 181 | |
182 | 182 | function expectLogContaining(log: ReturnType<typeof vi.fn>, fragment: string): void { |
183 | | -expect(log.mock.calls.some((call) => String(call[0]).includes(fragment))).toBe(true); |
| 183 | +expect(log.mock.calls.map((call) => String(call[0])).join("\n")).toContain(fragment); |
184 | 184 | } |
185 | 185 | |
186 | 186 | beforeAll(async () => { |
|
| Original file line number | Diff line number | Diff line change |
|---|
@@ -158,11 +158,11 @@ function finalizeInboundContextCall(
|
158 | 158 | } |
159 | 159 | |
160 | 160 | function expectSomeBodyContaining(bodies: readonly string[], fragment: string) { |
161 | | -expect(bodies.some((body) => body.includes(fragment))).toBe(true); |
| 161 | +expect(bodies.join("\n")).toContain(fragment); |
162 | 162 | } |
163 | 163 | |
164 | 164 | function expectNoBodyContaining(bodies: readonly string[], fragment: string) { |
165 | | -expect(bodies.some((body) => body.includes(fragment))).toBe(false); |
| 165 | +expect(bodies.join("\n")).not.toContain(fragment); |
166 | 166 | } |
167 | 167 | |
168 | 168 | describe("matrix group chat history — scenario 1: basic accumulation", () => { |
|
此内容由惯性聚合(RSS阅读器)自动聚合整理,仅供阅读参考。 原文来自 — 版权归原作者所有。