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

Commit

Permalink
Fix mocked media device query
Browse files Browse the repository at this point in the history
  • Loading branch information
Enrico Schwendig committed Jun 29, 2023
1 parent fed498e commit b83a798
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions test/components/views/voip/CallView-test.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -258,12 +258,14 @@ describe("CallLobby", () => {
});

it("hide when unknown error with device list", async () => {
const originalGetDevices = MediaDeviceHandler.getDevices;
MediaDeviceHandler.getDevices = () => Promise.reject("unknown error");
await renderView();
expect(MediaDeviceHandler.startWithAudioMuted).toBeTruthy();
expect(MediaDeviceHandler.startWithVideoMuted).toBeTruthy();
expect(screen.queryByRole("button", { name: /microphone/ })).toBe(null);
expect(screen.queryByRole("button", { name: /camera/ })).toBe(null);
MediaDeviceHandler.getDevices = originalGetDevices;
});

it("show without dropdown when only one device is available", async () => {
Expand Down

0 comments on commit b83a798

Please sign in to comment.