test (heartbeat): relax brittle reply option assertions

This commit is contained in:
Vignesh Natarajan
2026-02-16 11:57:29 -08:00
parent 3646625dc1
commit 1f99d82712
2 changed files with 20 additions and 12 deletions

View File

@@ -545,7 +545,7 @@ describe("runHeartbeatOnce", () => {
Body: expect.stringMatching(/Ops check[\s\S]*Current time: /),
SessionKey: sessionKey,
}),
{ isHeartbeat: true },
expect.objectContaining({ isHeartbeat: true }),
cfg,
);
} finally {
@@ -622,7 +622,7 @@ describe("runHeartbeatOnce", () => {
expect(sendWhatsApp).toHaveBeenCalledWith("+1555", "Final alert", expect.any(Object));
expect(replySpy).toHaveBeenCalledWith(
expect.objectContaining({ SessionKey: sessionKey }),
{ isHeartbeat: true },
expect.objectContaining({ isHeartbeat: true }),
cfg,
);
} finally {
@@ -700,7 +700,7 @@ describe("runHeartbeatOnce", () => {
expect(sendWhatsApp).toHaveBeenCalledWith(groupId, "Group alert", expect.any(Object));
expect(replySpy).toHaveBeenCalledWith(
expect.objectContaining({ SessionKey: groupSessionKey }),
{ isHeartbeat: true },
expect.objectContaining({ isHeartbeat: true }),
cfg,
);
} finally {