mirror of
https://github.com/moltbot/moltbot.git
synced 2026-05-17 02:37:33 +00:00
test: weave matrix message assertions
This commit is contained in:
@@ -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 () => {
|
||||
|
||||
@@ -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", () => {
|
||||
|
||||
Reference in New Issue
Block a user