import { resolve } from "node:path"; import { describe, expect, it, vi, afterEach } from "vitest"; import { render, fireEvent, cleanup } from "@testing-library/preact"; import { Nav } from "./Nav.js"; const sampleItems = [ { label: "Home", href: "/", active: true }, { label: "About", href: "/about" }, { label: "Contact", href: "/contact" }, ]; describe("Nav", () => { afterEach(() => { document.body.classList.remove("strand-glass-nav-active"); cleanup(); }); // ── Glass nav body class management ── // ── Rendering ── it("renders a nav element", () => { const { container } = render(