| 1 | import { describe, expect, it } from "vite-plus/test"; |
| 2 | import { |
| 3 | filterProjectIconNames, |
| 4 | firstEmoji, |
| 5 | projectIconColorClassName, |
| 6 | } from "./projectIconOptions"; |
| 7 | |
| 8 | describe("projectIconOptions", () => { |
| 9 | it("searches across the full Lucide set", () => { |
| 10 | expect(filterProjectIconNames("alarm clock")).toContain("alarm-clock"); |
| 11 | expect(filterProjectIconNames("alarm \tclock")).toContain("alarm-clock"); |
| 12 | }); |
| 13 | |
| 14 | it("extracts one complete emoji grapheme", () => { |
| 15 | expect(firstEmoji(" π©π½π» hello")).toBe("π©π½π»"); |
| 16 | expect(firstEmoji("πΊπΈ project")).toBe("πΊπΈ"); |
| 17 | expect(firstEmoji("1οΈβ£ project")).toBe("1οΈβ£"); |
| 18 | expect(firstEmoji("plain text")).toBeNull(); |
| 19 | }); |
| 20 | |
| 21 | it("maps persisted colors to theme-aware classes", () => { |
| 22 | expect(projectIconColorClassName("violet")).toBe("text-violet-600 dark:text-violet-400"); |
| 23 | }); |
| 24 | }); |