AkurAI Build
Menu

popagent

public

Latest change 575490fe67b97f5e9d8b54f5f008c1877ed84864 - Add popular appearance themes by AkurAI Build

import { describe, expect, test } from "bun:test";
import { APPEARANCE_THEMES, parseAppearanceTheme, themeColorScheme } from "./appearance";

describe("appearance themes", () => {
  test("offers popular color themes and rejects stale values", () => {
    expect(APPEARANCE_THEMES.map((theme) => theme.id)).toEqual([
      "light",
      "dark",
      "dracula",
      "nord",
      "tokyo-night",
      "catppuccin",
      "gruvbox",
      "solarized-light",
    ]);
    expect(parseAppearanceTheme("tokyo-night")).toBe("tokyo-night");
    expect(parseAppearanceTheme("unknown")).toBeUndefined();
  });

  test("sets the browser color scheme independently from the palette", () => {
    expect(themeColorScheme("solarized-light")).toBe("light");
    expect(themeColorScheme("dracula")).toBe("dark");
  });
});