Make the CallEventAudioRenderer test stricter

This commit is contained in:
Robin
2025-09-05 14:06:28 +02:00
parent 1e8b87408c
commit c599d6eae9

View File

@@ -156,6 +156,7 @@ test("should not play a sound when a hand raise is retracted", () => {
]); ]);
render(<CallEventAudioRenderer vm={vm} />); render(<CallEventAudioRenderer vm={vm} />);
playSound.mockClear();
act(() => { act(() => {
handRaisedSubject$.next({ handRaisedSubject$.next({
["foo"]: { ["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(() => { act(() => {
handRaisedSubject$.next({ handRaisedSubject$.next({
["foo"]: { ["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");
}); });