Skip to content
This repository has been archived by the owner on Sep 11, 2024. It is now read-only.

Commit

Permalink
covg
Browse files Browse the repository at this point in the history
Signed-off-by: Michael Telatynski <[email protected]>
  • Loading branch information
t3chguy committed Jul 4, 2024
1 parent 5872591 commit 226e3d4
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions test/LegacyCallHandler-test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -461,6 +461,7 @@ describe("LegacyCallHandler without third party protocols", () => {
addEventListener: jest.fn(),
connect: jest.fn(),
start: jest.fn(),
stop: jest.fn(),
};
const mockAudioContext = {
decodeAudioData: jest.fn().mockResolvedValue({}),
Expand Down Expand Up @@ -556,6 +557,12 @@ describe("LegacyCallHandler without third party protocols", () => {
expect(fetchMock.calls("/media/ring.mp3")).toHaveLength(1);
});

it("should allow silencing an incoming call ring", async () => {
await callHandler.play(AudioID.Ring);
await callHandler.silenceCall("call123");
expect(mockAudioBufferSourceNode.stop).toHaveBeenCalled();
});

it("should still start a native call", async () => {
callHandler.placeCall(NATIVE_ROOM_ALICE, CallType.Voice);

Expand Down

0 comments on commit 226e3d4

Please sign in to comment.