build: add jest, tests

This commit is contained in:
2024-03-12 21:23:19 +02:00
parent fdb28fa612
commit ea3cb13c85
19 changed files with 2173 additions and 13 deletions

10
tests/classNames.test.ts Normal file
View 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",
);
});