import {
  resolveUnifiedColorSymbol,
  setUnifiedColorEntries,
} from "./editorCore";

describe("editorCore", () => {
  it("updates the unified color lookup from catalog entries", () => {
    setUnifiedColorEntries([
      { key: "A", color: "#123456" },
      { key: "!", color: "#FFFFFF" },
    ]);

    expect(resolveUnifiedColorSymbol("A")).toBe("#123456");
    expect(resolveUnifiedColorSymbol(".")).toBe("#00000000");
    expect(resolveUnifiedColorSymbol("Z", "#ABCDEF")).toBe("#ABCDEF");
  });
});
