mirror of
https://github.com/openclaw/openclaw.git
synced 2026-05-06 07:30:43 +00:00
test(matrix): tighten pairing reminder assertion
This commit is contained in:
@@ -180,9 +180,9 @@ describe("matrix monitor handler pairing account scope", () => {
|
||||
await handler("!room:example.org", makeEvent("$event1"));
|
||||
await handler("!room:example.org", makeEvent("$event2"));
|
||||
expect(sendMessageMatrixMock).toHaveBeenCalledTimes(1);
|
||||
expect(JSON.stringify(sendMessageMatrixMock.mock.calls[0]?.[1] ?? {})).toContain(
|
||||
"Pairing request is still pending approval.",
|
||||
);
|
||||
const pairingReminder = sendMessageMatrixMock.mock.calls[0]?.[1];
|
||||
expect(typeof pairingReminder).toBe("string");
|
||||
expect(pairingReminder).toContain("Pairing request is still pending approval.");
|
||||
|
||||
await vi.advanceTimersByTimeAsync(5 * 60_000 + 1);
|
||||
await handler("!room:example.org", makeEvent("$event3"));
|
||||
|
||||
Reference in New Issue
Block a user