24 lines Β· 887 B Β· TypeScript
RawDownload
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");  });});