local-frontier / tests /utils.test.ts
Onur Solmaz
feat: add shadcn TypeScript scaffold
b2301b7
Raw
History Blame Contribute Delete
535 Bytes
import { describe, expect, it } from "vitest";
import { defaultCompareResultLimit } from "@/lib/compare-defaults";
import { cn } from "@/lib/utils";
describe("cn", () => {
it("merges conditional classes and resolves Tailwind conflicts", () => {
expect(cn("px-2", false, ["text-sm", "px-4"], { hidden: true })).toBe(
"text-sm px-4 hidden",
);
});
});
describe("defaultCompareResultLimit", () => {
it("keeps the initial comparison slice readable", () => {
expect(defaultCompareResultLimit()).toBe(8);
});
});