import { expect, test } from "bun:test"; // Server HTML renders tooltip content before the client applies data-show, so // a closed tooltip must also be hidden by CSS or it flashes on every page load. test("closed tooltip content is hidden by CSS before hydration", async () => { const source = await Bun.file(new URL("../components/tooltip.wrn", import.meta.url)).text(); expect(source).toMatch(/\.wrn-tooltip\[data-open="false"\] \.wrn-tooltip__content \{\s*display: none;/); });