import { describe, expect, it } from "vite-plus/test";import { filterProjectIconNames, firstEmoji, projectIconColorClassName,} from "./projectIconOptions"; describe("projectIconOptions", () => { it("searches across the full Lucide set", () => { expect(filterProjectIconNames("alarm clock")).toContain("alarm-clock"); expect(filterProjectIconNames("alarm \tclock")).toContain("alarm-clock"); }); it("extracts one complete emoji grapheme", () => { expect(firstEmoji(" π©π½βπ» hello")).toBe("π©π½βπ»"); expect(firstEmoji("πΊπΈ project")).toBe("πΊπΈ"); expect(firstEmoji("1οΈβ£ project")).toBe("1οΈβ£"); expect(firstEmoji("plain text")).toBeNull(); }); it("maps persisted colors to theme-aware classes", () => { expect(projectIconColorClassName("violet")).toBe("text-violet-600 dark:text-violet-400"); });});
import { describe, expect, it } from "vite-plus/test";
import {
filterProjectIconNames,
firstEmoji,
projectIconColorClassName,
} from "./projectIconOptions";
describe("projectIconOptions", () => {
it("searches across the full Lucide set", () => {
expect(filterProjectIconNames("alarm clock")).toContain("alarm-clock");
expect(filterProjectIconNames("alarm \tclock")).toContain("alarm-clock");
});
it("extracts one complete emoji grapheme", () => {
expect(firstEmoji(" π©π½βπ» hello")).toBe("π©π½βπ»");
expect(firstEmoji("πΊπΈ project")).toBe("πΊπΈ");
expect(firstEmoji("1οΈβ£ project")).toBe("1οΈβ£");
expect(firstEmoji("plain text")).toBeNull();
});
it("maps persisted colors to theme-aware classes", () => {
expect(projectIconColorClassName("violet")).toBe("text-violet-600 dark:text-violet-400");
});
});