chore: Enforce a few house rules via eslint (#2539)
This commit is contained in:
committed by
dermotduffy
parent
5572ec728e
commit
921d45e577
@@ -56,6 +56,19 @@ describe('MicrophoneActionsController', () => {
|
||||
expect(microphoneManager.mute).not.toBeCalled();
|
||||
});
|
||||
|
||||
it('should swallow a rejected auto-unmute so a denied microphone does not surface', async () => {
|
||||
const microphoneManager = createMicrophoneManager();
|
||||
vi.mocked(microphoneManager.unmute).mockRejectedValue(new Error('denied'));
|
||||
const controller = new MicrophoneActionsController();
|
||||
controller.setOptions({
|
||||
microphoneManager,
|
||||
autoUnmuteConditions: ['selected' as const],
|
||||
});
|
||||
|
||||
await expect(controller.setSelectedCamera('camera-1')).resolves.toBeUndefined();
|
||||
expect(microphoneManager.unmute).toBeCalledTimes(1);
|
||||
});
|
||||
|
||||
it('should mute on unselected when transitioning to a new camera', async () => {
|
||||
const microphoneManager = createMicrophoneManager();
|
||||
const controller = new MicrophoneActionsController();
|
||||
|
||||
Reference in New Issue
Block a user