Skip to content

Record your screen, ship a demo. Free and open-source, GPU-accelerated, no watermarks, no subscriptions. Windows, macOS, Linux. Actively maintained.

cover Windows drive-letter file URLs in legacy wallpaper normalizer test

Enriquefft373319808e99
diff --git a/src/components/video-editor/projectPersistence.test.ts b/src/components/video-editor/projectPersistence.test.ts
index 0659cb71f..8a17b9e9f 100644
--- a/src/components/video-editor/projectPersistence.test.ts
+++ b/src/components/video-editor/projectPersistence.test.ts
@@ -220,6 +220,13 @@ describe("wallpaper legacy normalization", () => {
expect(normalized.wallpaper).toBe("/wallpapers/wallpaper1.jpg");
});
+ it("rewrites Windows-style file URLs with drive letter", () => {
+ const normalized = normalizeProjectEditor({
+ wallpaper: "file:///C:/Users/me/openscreen/resources/wallpapers/wallpaper2.jpg",
+ });
+ expect(normalized.wallpaper).toBe("/wallpapers/wallpaper2.jpg");
+ });
+
it("leaves canonical relative paths untouched", () => {
const normalized = normalizeProjectEditor({ wallpaper: "/wallpapers/wallpaper2.jpg" });
expect(normalized.wallpaper).toBe("/wallpapers/wallpaper2.jpg");