14 lines
437 B
TypeScript
14 lines
437 B
TypeScript
import { describe, expect, it } from "vite-plus/test";
|
|
|
|
import { getPreviewPanelMaxWidth } from "./PreviewPanelShell";
|
|
|
|
describe("getPreviewPanelMaxWidth", () => {
|
|
it("allows the panel to use 70% of an ultra-wide viewport without a pixel ceiling", () => {
|
|
expect(getPreviewPanelMaxWidth(6_000)).toBe(4_200);
|
|
});
|
|
|
|
it("rounds fractional CSS pixels down", () => {
|
|
expect(getPreviewPanelMaxWidth(2_001)).toBe(1_400);
|
|
});
|
|
});
|