diff options
| author | Maze Winther <mazewinther@gmail.com> | 2026-04-20 11:31:17 +0200 |
|---|---|---|
| committer | Maze Winther <mazewinther@gmail.com> | 2026-04-20 11:31:17 +0200 |
| commit | 3e89d2998588f8e35c524e523ba2ee853f0f6475 (patch) | |
| tree | 57221f96c1259b3b07e3ddf8c1adefc502b9d8eb /apps/web/src/lib/fps/__tests__ | |
| parent | 729d10592f4e802f91c555c309ff3ba4b119f843 (diff) | |
| download | opencut-3e89d2998588f8e35c524e523ba2ee853f0f6475.tar.gz | |
refactor: restructure files to their domains, new preview overlay system, and dep graph
Diffstat (limited to 'apps/web/src/lib/fps/__tests__')
| -rw-r--r-- | apps/web/src/lib/fps/__tests__/fps.test.ts | 65 |
1 files changed, 0 insertions, 65 deletions
diff --git a/apps/web/src/lib/fps/__tests__/fps.test.ts b/apps/web/src/lib/fps/__tests__/fps.test.ts deleted file mode 100644 index 10eed8d9..00000000 --- a/apps/web/src/lib/fps/__tests__/fps.test.ts +++ /dev/null @@ -1,65 +0,0 @@ -import { describe, expect, test } from "bun:test"; -import { - getHighestImportedVideoFps, - getRaisedProjectFpsForImportedMedia, -} from "@/lib/fps/utils"; - -describe("getHighestImportedVideoFps", () => { - test("returns the highest valid video fps", () => { - expect( - getHighestImportedVideoFps({ - mediaAssets: [ - { type: "audio" }, - { type: "video", fps: 30 }, - { type: "image", fps: 120 }, - { type: "video", fps: 60 }, - ], - }), - ).toBe(60); - }); - - test("ignores missing and invalid fps values", () => { - expect( - getHighestImportedVideoFps({ - mediaAssets: [ - { type: "video" }, - { type: "video", fps: 0 }, - { type: "video", fps: -10 }, - { type: "audio", fps: 120 }, - ], - }), - ).toBeNull(); - }); -}); - -describe("getRaisedProjectFpsForImportedMedia", () => { - test("raises the project fps to match a higher-fps import", () => { - expect( - getRaisedProjectFpsForImportedMedia({ - currentFps: { numerator: 30, denominator: 1 }, - importedAssets: [{ type: "video", fps: 60 }], - }), - ).toEqual({ numerator: 60, denominator: 1 }); - }); - - test("does not lower the project fps for lower-fps imports", () => { - expect( - getRaisedProjectFpsForImportedMedia({ - currentFps: { numerator: 60, denominator: 1 }, - importedAssets: [{ type: "video", fps: 10 }], - }), - ).toBeNull(); - }); - - test("ignores non-video imports", () => { - expect( - getRaisedProjectFpsForImportedMedia({ - currentFps: { numerator: 30, denominator: 1 }, - importedAssets: [ - { type: "image", fps: 60 }, - { type: "audio", fps: 120 }, - ], - }), - ).toBeNull(); - }); -}); |
