feat: Add microphone_disconnect action (#1536)
This commit is contained in:
@@ -0,0 +1,18 @@
|
||||
import { expect, it } from 'vitest';
|
||||
import { MicrophoneDisconnectAction } from '../../../../src/card-controller/actions/actions/microphone-disconnect';
|
||||
import { createCardAPI } from '../../../test-utils';
|
||||
|
||||
it('should handle microphone_disconnect action', async () => {
|
||||
const api = createCardAPI();
|
||||
const action = new MicrophoneDisconnectAction(
|
||||
{},
|
||||
{
|
||||
action: 'fire-dom-event',
|
||||
frigate_card_action: 'microphone_disconnect',
|
||||
},
|
||||
);
|
||||
|
||||
await action.execute(api);
|
||||
|
||||
expect(api.getMicrophoneManager().disconnect).toBeCalled();
|
||||
});
|
||||
Reference in New Issue
Block a user