1import { AlarmClockCheck, ArrowDown01, Layers3 } from "lucide-react";
2import { describe, expect, it } from "vite-plus/test";
3import { lucideIconByName } from "./lib/lucideIconByName";
4import { filterProjectIconNames, firstEmoji } from "./projectIconOptions";
5β
6describe("projectIconOptions", () => {
7 it("resolves every offered icon name, including saved legacy spellings", () => {
8 for (const name of filterProjectIconNames("")) expect(lucideIconByName(name)).toBeDefined();
9 expect(lucideIconByName("layers-3")).toBe(Layers3);
10 expect(lucideIconByName("arrow-down-01")).toBe(ArrowDown01);
11 expect(lucideIconByName("arrow-down-0-1")).toBe(ArrowDown01);
12 expect(lucideIconByName("alarm-check")).toBe(AlarmClockCheck);
13 expect(lucideIconByName("create-lucide-icon")).toBeUndefined();
14 });
15β
16 it("extracts one complete emoji grapheme", () => {
17 expect(firstEmoji(" π©π½βπ» hello")).toBe("π©π½βπ»");
18 expect(firstEmoji("πΊπΈ project")).toBe("πΊπΈ");
19 expect(firstEmoji("1οΈβ£ project")).toBe("1οΈβ£");
20 expect(firstEmoji("plain text")).toBeNull();
21 });
22});