import { describe, it, expect } from "vitest"; import { videoFitClass } from "./videoFit"; describe("videoFitClass", () => { it("fills the container instead of capping at the source's intrinsic size", () => { const cls = videoFitClass(); // max-w/max-h only shrink oversized media; a 480p source would stay a small // box in the middle of a large window. expect(cls).not.toContain("max-w-full"); expect(cls).not.toContain("max-h-full"); expect(cls).toContain("w-full"); expect(cls).toContain("h-full"); }); it("preserves aspect ratio while fitting (letterbox, never crop)", () => { const cls = videoFitClass(); expect(cls).toContain("object-contain"); expect(cls).not.toContain("object-cover"); expect(cls).not.toContain("object-fill"); }); });