Skip to content
Source
Sign inSign up
pingdotgg/t3code
Open History to see the last commit

PreviewPanelShell.test.ts

13 lines437 Bytes

1import { describe, expect, it } from "vite-plus/test";
2​
3import { getPreviewPanelMaxWidth } from "./PreviewPanelShell";
4​
5describe("getPreviewPanelMaxWidth", () => {
6 it("allows the panel to use 70% of an ultra-wide viewport without a pixel ceiling", () => {
7 expect(getPreviewPanelMaxWidth(6_000)).toBe(4_200);
8 });
9​
10 it("rounds fractional CSS pixels down", () => {
11 expect(getPreviewPanelMaxWidth(2_001)).toBe(1_400);
12 });
13});