| ... | @@ -1,10 +1,7 @@ | ... | @@ -1,10 +1,7 @@ |
| 1 | import type { PreviewViewportSetting } from "@t3tools/contracts"; | 1 | import type { PreviewViewportSetting } from "@t3tools/contracts"; |
| 2 | import { describe, expect, it, vi } from "vite-plus/test"; | 2 | import { describe, expect, it, vi } from "vite-plus/test"; |
| 3 | | 3 | |
| 4 | import { | 4 | import { commitViewportAndAspectRatio } from "./browserDeviceToolbarState"; |
| 5 | commitViewportAndAspectRatio, | | |
| 6 | reconcileLockedAspectRatio, | | |
| 7 | } from "./browserDeviceToolbarState"; | | |
| 8 | | 5 | |
| 9 | describe("commitViewportAndAspectRatio", () => { | 6 | describe("commitViewportAndAspectRatio", () => { |
| 10 | it("commits the aspect ratio only after the viewport succeeds", async () => { | 7 | it("commits the aspect ratio only after the viewport succeeds", async () => { |
| ... | @@ -39,11 +36,3 @@ describe("commitViewportAndAspectRatio", () => { | ... | @@ -39,11 +36,3 @@ describe("commitViewportAndAspectRatio", () => { |
| 39 | expect(onAspectRatioChange).not.toHaveBeenCalled(); | 36 | expect(onAspectRatioChange).not.toHaveBeenCalled(); |
| 40 | }); | 37 | }); |
| 41 | }); | 38 | }); |
| 42 | | | |
| 43 | describe("reconcileLockedAspectRatio", () => { | | |
| 44 | it("tracks external viewport ratios only while the lock remains active", () => { | | |
| 45 | expect(reconcileLockedAspectRatio(1.5, 16 / 9)).toBe(16 / 9); | | |
| 46 | expect(reconcileLockedAspectRatio(null, 16 / 9)).toBeNull(); | | |
| 47 | expect(reconcileLockedAspectRatio(1.5, null)).toBeNull(); | | |
| 48 | }); | | |
| 49 | }); | | |