first commit

This commit is contained in:
Zakaria
2026-09-22 16:13:21 -04:00
commit 7e49be27f1
297 changed files with 63162 additions and 0 deletions
+9
View File
@@ -0,0 +1,9 @@
import { formatBytes, slugify } from "@/lib/format";
describe("@ alias resolution", () => {
it("resolves @/lib/format and calls its exports", () => {
expect(formatBytes(0)).toBe("0 B");
expect(formatBytes(1536)).toBe("1.5 KB");
expect(slugify("Hello, World!")).toBe("hello-world");
});
});
+19
View File
@@ -0,0 +1,19 @@
describe("test infrastructure", () => {
it("runs in a jsdom environment with a mutable document", () => {
expect(document.body).toBeInstanceOf(HTMLElement);
const marker = document.createElement("div");
marker.id = "jsdom-marker";
document.body.appendChild(marker);
expect(document.getElementById("jsdom-marker")).toBe(marker);
});
it("registers the jest-dom matchers", () => {
const el = document.createElement("p");
el.textContent = "hello from jest-dom";
document.body.appendChild(el);
expect(el).toBeInTheDocument();
});
});