test: weave matrix message assertions

This commit is contained in:
Shakker
2026-05-12 21:49:34 +01:00
parent 8792341cf6
commit cee32280c6
2 changed files with 3 additions and 3 deletions

View File

@@ -180,7 +180,7 @@ function sentContentAt(callIndex: number): Record<string, unknown> {
}
function expectLogContaining(log: ReturnType<typeof vi.fn>, fragment: string): void {
expect(log.mock.calls.some((call) => String(call[0]).includes(fragment))).toBe(true);
expect(log.mock.calls.map((call) => String(call[0])).join("\n")).toContain(fragment);
}
beforeAll(async () => {

View File

@@ -158,11 +158,11 @@ function finalizeInboundContextCall(
}
function expectSomeBodyContaining(bodies: readonly string[], fragment: string) {
expect(bodies.some((body) => body.includes(fragment))).toBe(true);
expect(bodies.join("\n")).toContain(fragment);
}
function expectNoBodyContaining(bodies: readonly string[], fragment: string) {
expect(bodies.some((body) => body.includes(fragment))).toBe(false);
expect(bodies.join("\n")).not.toContain(fragment);
}
describe("matrix group chat history — scenario 1: basic accumulation", () => {