WIP! A BB-style forum, on the ATmosphere! We're still working... we'll be back soon when we have something to show off!
node typescript hono htmx atproto
at atb-52-css-token-extraction 22 lines 709 B view raw
1import { describe, it, expect } from "vitest"; 2import { Hono } from "hono"; 3import { Card } from "../card.js"; 4 5describe("Card", () => { 6 it("renders with card class", async () => { 7 const app = new Hono().get("/", (c) => c.html(<Card>content</Card>)); 8 const res = await app.request("/"); 9 const html = await res.text(); 10 expect(html).toContain('class="card"'); 11 expect(html).toContain("content"); 12 }); 13 14 it("appends additional class names", async () => { 15 const app = new Hono().get("/", (c) => 16 c.html(<Card class="extra">content</Card>) 17 ); 18 const res = await app.request("/"); 19 const html = await res.text(); 20 expect(html).toContain('class="card extra"'); 21 }); 22});