Open source Loom alternative. Beautiful, shareable screen recordings.
Rust appcapcossloommacnextjsnextjs15open-sourceossreactrecordrustscreen-capturescreen-recorderscreenshotsolidjstauritauri-apptypescriptvite
test(editor): add existing recording picker options tests
Richie McIlroye8b7d2cff5b1
diff --git a/apps/desktop/src/routes/editor/existing-recording-picker.test.ts b/apps/desktop/src/routes/editor/existing-recording-picker.test.tsnew file mode 100644index 000000000..91e10117b--- /dev/null+++ b/apps/desktop/src/routes/editor/existing-recording-picker.test.ts@@ -0,0 +1,28 @@+import { describe, expect, it } from "vitest";++import { getExistingRecordingPickerOptions } from "./existing-recording-picker";++describe("existing recording picker", () => {+ it("selects Cap project directories on Windows", () => {+ expect(+ getExistingRecordingPickerOptions("windows", "C:\\Cap\\recordings"),+ ).toEqual({+ defaultPath: "C:\\Cap\\recordings",+ directory: true,+ multiple: false,+ });+ });++ it.each(["macos", "linux"] as const)(+ "preserves the filtered file picker on %s",+ (platform) => {+ expect(+ getExistingRecordingPickerOptions(platform, "/Cap/recordings"),+ ).toEqual({+ defaultPath: "/Cap/recordings",+ filters: [{ name: "Cap Recording", extensions: ["cap"] }],+ multiple: false,+ });+ },+ );+});