build: add jest, tests
This commit is contained in:
10
tests/classNames.test.ts
Normal file
10
tests/classNames.test.ts
Normal file
@@ -0,0 +1,10 @@
|
||||
import { expect, test } from "@jest/globals";
|
||||
import { classNames } from "../src";
|
||||
|
||||
test("joins html class strings", () => {
|
||||
let isVisible = false;
|
||||
|
||||
expect(classNames("bg-blue-300", isVisible ? "block" : "hidden")).toBe(
|
||||
"bg-blue-300 hidden",
|
||||
);
|
||||
});
|
||||
Reference in New Issue
Block a user