import { describe, expect, it } from "vitest"; import { partyTalentAllocationPlan } from "./partyTalents"; import { partyTalentSelections } from "./partyTalentUi"; import { loadTalentUiCatalog } from "./talentUiCatalog"; describe("party talent UI projection", () => { it("reconstructs the generated runtime plan from one class shard", async () => { const catalog = await loadTalentUiCatalog("warrior"); const projected = partyTalentSelections(catalog, "warrior", "Protection"); const source = partyTalentAllocationPlan("warrior", "Protection"); expect(projected).toHaveLength(71); expect(projected.map((selection) => ({ nodeId: selection.nodeId, rank: selection.rank, description: selection.description, }))).toEqual(source.map((selection) => ({ nodeId: selection.nodeId, rank: selection.rank, description: selection.description, }))); }); });