import { describe, it, expect } from "vitest";
import { litIconSvg, MAP_ICON_IDS } from "../../../src/features/map/node-icons";
const GLYPH = ``;
describe("litIconSvg", () => {
const svg = litIconSvg(GLYPH, "#A78BFA");
it("fills the disc with the type colour and draws the glyph in white", () => {
expect(svg).toContain('r="29" fill="#A78BFA"');
expect(svg).toContain(' {
expect(svg).toContain('stroke="#ff6b35"');
expect(svg).toMatch(/r="39\.1\d*"/); // 16 * 88 / 36
expect(svg).toMatch(/stroke-width="6\.1\d*"/); // 2.5 * 88 / 36
});
});
it("registers a lit icon per node type", () => {
expect(MAP_ICON_IDS).toEqual(
expect.arrayContaining(["node-lit-repeater", "node-lit-companion", "node-lit-room_server", "node-lit-sensor"]),
);
});