From c599d6eae997f61c1cf73924651b9039d0f16338 Mon Sep 17 00:00:00 2001 From: Robin Date: Fri, 5 Sep 2025 14:06:28 +0200 Subject: [PATCH] Make the CallEventAudioRenderer test stricter --- src/room/CallEventAudioRenderer.test.tsx | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/room/CallEventAudioRenderer.test.tsx b/src/room/CallEventAudioRenderer.test.tsx index f51e602d..894d1d24 100644 --- a/src/room/CallEventAudioRenderer.test.tsx +++ b/src/room/CallEventAudioRenderer.test.tsx @@ -156,6 +156,7 @@ test("should not play a sound when a hand raise is retracted", () => { ]); render(); + playSound.mockClear(); act(() => { handRaisedSubject$.next({ ["foo"]: { @@ -170,7 +171,7 @@ test("should not play a sound when a hand raise is retracted", () => { }, }); }); - expect(playSound).toHaveBeenCalledTimes(1); + expect(playSound).toHaveBeenCalledExactlyOnceWith("raiseHand"); act(() => { handRaisedSubject$.next({ ["foo"]: { @@ -180,5 +181,5 @@ test("should not play a sound when a hand raise is retracted", () => { }, }); }); - expect(playSound).toHaveBeenCalledTimes(1); + expect(playSound).toHaveBeenCalledExactlyOnceWith("raiseHand"); });