Files
Recordly/electron/ipc/recording/windowsFallbacks.test.ts
webadderall 05a6d3f1b6 Fix embedded audio fallback handling and audio diagnostics (#309)
* Fix embedded audio fallback handling and audio diagnostics

* Add recording fallback diagnostics toasts

* Fix Windows audio fallback cleanup and path matching

* Format rebased recording fallback changes

* Fix embedded audio preview and export fallback handling
2026-04-24 11:30:10 +10:00

23 lines
725 B
TypeScript

import { describe, expect, it } from "vitest";
import { shouldUseWindowsBrowserMicrophoneFallback } from "./windowsFallbacks";
describe("shouldUseWindowsBrowserMicrophoneFallback", () => {
it("returns true when native Windows mic initialization fails", () => {
expect(
shouldUseWindowsBrowserMicrophoneFallback(
"WARNING: Failed to initialize WASAPI mic capture\nRecording started",
{ capturesMicrophone: true },
),
).toBe(true);
});
it("returns false when microphone capture was not requested", () => {
expect(
shouldUseWindowsBrowserMicrophoneFallback(
"WARNING: Failed to initialize WASAPI mic capture\nRecording started",
{ capturesMicrophone: false },
),
).toBe(false);
});
});