mirror of
https://github.com/savar-g/taskline.git
synced 2026-07-22 08:33:55 +00:00
16 lines
664 B
TypeScript
16 lines
664 B
TypeScript
import { describe, expect, it } from "vitest";
|
|
import { areaColor } from "../src/ui/areaColor";
|
|
import { WORKSPACE } from "./fixtures";
|
|
|
|
describe("areaColor", () => {
|
|
it("uses configured area, group, route, and filter colors", () => {
|
|
expect(areaColor("writing", WORKSPACE)).toBe("var(--color-pink)");
|
|
expect(areaColor("Shared work", WORKSPACE)).toBe("var(--color-purple)");
|
|
expect(areaColor("automated", WORKSPACE)).toBe("var(--color-green)");
|
|
});
|
|
|
|
it("gives unknown values a stable theme color", () => {
|
|
expect(areaColor("Unknown")).toBe(areaColor("Unknown"));
|
|
expect(areaColor("Unknown")).toMatch(/^var\(--color-[a-z]+\)$/);
|
|
});
|
|
});
|