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
1import { describe, it, expect } from "vitest";
2import { tokensToCss } from "../theme.js";
3
4describe("tokensToCss", () => {
5 it("converts token map to CSS custom property declarations", () => {
6 const tokens = { "color-bg": "#f5f0e8", "font-size-base": "16px" };
7 const result = tokensToCss(tokens);
8 expect(result).toContain("--color-bg: #f5f0e8");
9 expect(result).toContain("--font-size-base: 16px");
10 });
11
12 it("returns empty string for empty token map", () => {
13 expect(tokensToCss({})).toBe("");
14 });
15
16 it("joins declarations with semicolons", () => {
17 const result = tokensToCss({ a: "1", b: "2" });
18 expect(result).toBe("--a: 1; --b: 2");
19 });
20});