Skip to content

A desktop coding agent with free access to frontier models.

TypeScript
897 B
Raw Blame
import { readFileSync } from "node:fs";
import { fileURLToPath } from "node:url";
import { describe, expect, test } from "bun:test";

const buttonPath = fileURLToPath(
  new URL("../app/(den)/_components/ui/button.tsx", import.meta.url),
);

describe("dashboard button geometry", () => {
  test("shared action primitives use softly rounded rectangles", () => {
    const source = readFileSync(buttonPath, "utf8");

    expect(source).toContain("rounded-lg");
    expect(source).not.toContain("rounded-full");
  });

  test("shared action primitives keep labels on one line", () => {
    const source = readFileSync(buttonPath, "utf8");

    const baseClassLists = source.match(/"[^"]*rounded-lg font-medium transition-colors"/g) ?? [];
    expect(baseClassLists.length).toBe(2);
    for (const classList of baseClassLists) {
      expect(classList).toContain("whitespace-nowrap");
    }
  });
});