// NavItem, as an application meets it. // // "Where am I" is the assertion this file is really about. An item that is // only tinted is current to the eye and identical to everything else for // anything that reads the page, so `aria-current` is checked in every form the // component offers — and checked to be absent when the item is not current, // since an item list where everything claims to be the page is no better. import { describe, expect, it, vi } from "vitest"; import { quietControl } from "@reddb-io/design-system/base"; import NavItem from "../src/primitives/NavItem.svelte"; import { navItem } from "../src/primitives/nav-item.variants"; import { classes, classesOf, click, render, rendered, text } from "./mount"; describe("NavItem", () => { it("renders an when it goes somewhere", () => { const element = rendered(render(NavItem, { label: "Tokens", href: "/tokens" })); expect(element.tagName).toBe("A"); expect(element.getAttribute("href")).toBe("/tokens"); expect(element.textContent?.trim()).toBe("Tokens"); }); it("renders a