import { describe, it, expect } from "vitest"; import { Hono } from "hono"; import { Button } from "../button.js"; describe("Button", () => { it("renders as ) ); const res = await app.request("/"); const html = await res.text(); expect(html).toContain(" when href provided", async () => { const app = new Hono().get("/", (c) => c.html() ); const res = await app.request("/"); const html = await res.text(); expect(html).toContain(" { const app = new Hono().get("/", (c) => c.html() ); const res = await app.request("/"); const html = await res.text(); expect(html).toContain("btn-danger"); }); it("includes base btn class on all variants", async () => { const app = new Hono().get("/", (c) => c.html() ); const res = await app.request("/"); const html = await res.text(); expect(html).toMatch(/class="btn /); }); });