test: dedupe signal reply mock reads

This commit is contained in:
Peter Steinberger
2026-05-13 09:24:08 +01:00
parent b693173e0d
commit 06e04291e0

View File

@@ -140,7 +140,7 @@ describe("monitorSignalProvider tool results", () => {
await vi.waitFor(() => {
expect(sendMock).toHaveBeenCalledTimes(1);
});
expect(sendMock.mock.calls.at(0)?.[1]).toBe("PFX final reply");
expect(sendMock.mock.calls[0]?.[1]).toBe("PFX final reply");
});
it("replies with pairing code when dmPolicy is pairing and no allowFrom is set", async () => {
@@ -165,7 +165,7 @@ describe("monitorSignalProvider tool results", () => {
expect(replyMock).not.toHaveBeenCalled();
expect(upsertPairingRequestMock).toHaveBeenCalled();
expect(sendMock).toHaveBeenCalledTimes(1);
expectPairingReplyText(String(sendMock.mock.calls.at(0)?.[1] ?? ""), {
expectPairingReplyText(String(sendMock.mock.calls[0]?.[1] ?? ""), {
channel: "signal",
idLine: "Your Signal number: +15550001111",
code: "PAIRCODE",