test(web): make heartbeat call selection deterministic

This commit is contained in:
Peter Steinberger
2025-12-14 03:59:40 +00:00
parent e9e2e5026c
commit 38a773f245

View File

@@ -822,7 +822,8 @@ describe("web auto-reply", () => {
await run;
const heartbeatCall = replyResolver.mock.calls.find(
(call) => call[0]?.Body === HEARTBEAT_PROMPT,
(call) =>
call[0]?.Body === HEARTBEAT_PROMPT && call[0]?.MessageSid === "sid-main",
);
expect(heartbeatCall?.[0]?.From).toBe("+1555");
expect(heartbeatCall?.[0]?.To).toBe("+1555");