Add support for connecting microphone on card load.

This commit is contained in:
Dermot Duffy
2023-05-07 15:17:39 -07:00
parent c78d4be0c3
commit ee7d02fc58
11 changed files with 55 additions and 12 deletions
+3
View File
@@ -15,6 +15,7 @@ describe('MicrophoneController', () => {
});
afterEach(() => {
vi.resetAllMocks();
vi.unstubAllGlobals;
});
@@ -48,6 +49,8 @@ describe('MicrophoneController', () => {
});
it('should be forbidden when permission denied', async () => {
// Don't actually log messages to the console during the test.
vi.spyOn(global.console, 'warn').mockReturnValue(undefined);
const controller = new MicrophoneController();
navigatorMock.mediaDevices.getUserMedia.mockRejectedValue(new Error());
await controller.connect();