Make the CallEventAudioRenderer test stricter
This commit is contained in:
@@ -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");
|
||||||
});
|
});
|
||||||
|
|||||||
Reference in New Issue
Block a user