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
+5 -3
View File
@@ -1,14 +1,16 @@
import { describe, expect, it, vi } from 'vitest';
import { afterAll, describe, expect, it, vi } from 'vitest';
import { log } from '../../src/utils/debug.js';
describe('log', () => {
const spy = vi.spyOn(global.console, 'debug').mockReturnValue(undefined);
afterAll(() => {
vi.resetAllMocks();
});
it('should do nothing without debug logging set', () => {
const spy = vi.spyOn(global.console, 'debug');
log({}, 'foo');
expect(spy).not.toBeCalled();
});
it('should log debug when appropriately configured', () => {
const spy = vi.spyOn(global.console, 'debug');
log({ debug: { logging: true } }, 'foo');
expect(spy).toBeCalledWith('foo');
});