diff options
| author | Maze Winther <mazewinther@gmail.com> | 2026-04-14 18:17:14 +0200 |
|---|---|---|
| committer | Maze Winther <mazewinther@gmail.com> | 2026-04-14 18:17:14 +0200 |
| commit | 6de6c7fd95de1de9d8d3107eaf7ce1dd150ed094 (patch) | |
| tree | 75d5eb387b867449fc2218f5fe9b3acc70731561 /apps/web/src/services/storage/migrations/__tests__ | |
| parent | 34c67ef8e85eafd6dfe6808280c807aceb00a345 (diff) | |
| download | opencut-6de6c7fd95de1de9d8d3107eaf7ce1dd150ed094.tar.gz | |
refactor: move constants to domain modules
Diffstat (limited to 'apps/web/src/services/storage/migrations/__tests__')
| -rw-r--r-- | apps/web/src/services/storage/migrations/__tests__/v1-to-v2.test.ts | 6 | ||||
| -rw-r--r-- | apps/web/src/services/storage/migrations/__tests__/v20-to-v21.test.ts | 7 |
2 files changed, 8 insertions, 5 deletions
diff --git a/apps/web/src/services/storage/migrations/__tests__/v1-to-v2.test.ts b/apps/web/src/services/storage/migrations/__tests__/v1-to-v2.test.ts index 7a0617a7..56c83403 100644 --- a/apps/web/src/services/storage/migrations/__tests__/v1-to-v2.test.ts +++ b/apps/web/src/services/storage/migrations/__tests__/v1-to-v2.test.ts @@ -1,9 +1,9 @@ import { describe, expect, test } from "bun:test"; import { DEFAULT_BACKGROUND_BLUR_INTENSITY, - DEFAULT_BACKGROUND_COLOR, -} from "@/lib/background/constants"; -import { DEFAULT_CANVAS_SIZE } from "@/lib/canvas/constants"; +} from "@/lib/background/blur"; +import { DEFAULT_BACKGROUND_COLOR } from "@/lib/background/color"; +import { DEFAULT_CANVAS_SIZE } from "@/lib/canvas/sizes"; const DEFAULT_FPS = 30; import type { MediaAssetData } from "@/services/storage/types"; import { getProjectId, transformProjectV1ToV2 } from "../transformers/v1-to-v2"; diff --git a/apps/web/src/services/storage/migrations/__tests__/v20-to-v21.test.ts b/apps/web/src/services/storage/migrations/__tests__/v20-to-v21.test.ts index af2124c8..3d77a775 100644 --- a/apps/web/src/services/storage/migrations/__tests__/v20-to-v21.test.ts +++ b/apps/web/src/services/storage/migrations/__tests__/v20-to-v21.test.ts @@ -1,7 +1,8 @@ import { describe, expect, test } from "bun:test"; -import { DEFAULT_BLUR_INTENSITY } from "@/constants/project-constants"; import { transformProjectV20ToV21 } from "../transformers/v20-to-v21"; +const LEGACY_DEFAULT_BACKGROUND_BLUR_INTENSITY = 50; + describe("V20 to V21 Migration", () => { test("multiplies blur background intensity by 5", () => { const result = transformProjectV20ToV21({ @@ -46,7 +47,9 @@ describe("V20 to V21 Migration", () => { expect(result.skipped).toBe(false); const settings = result.project.settings as Record<string, unknown>; const background = settings.background as Record<string, unknown>; - expect(background.blurIntensity).toBe(DEFAULT_BLUR_INTENSITY); + expect(background.blurIntensity).toBe( + LEGACY_DEFAULT_BACKGROUND_BLUR_INTENSITY, + ); }); test("leaves color background unchanged", () => { |
