17 lines
799 B
TypeScript
17 lines
799 B
TypeScript
import { describe, expect, it } from "vitest";
|
|
import { runtimePartyTalentPlan } from "./partyTalentRuntime";
|
|
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 = runtimePartyTalentPlan("warrior", "Protection");
|
|
|
|
expect(projected).toHaveLength(71);
|
|
expect(projected.map((selection) => selection.nodeId)).toEqual(source);
|
|
expect(projected.every((selection) => selection.rank >= 1 && selection.description.length > 0)).toBe(true);
|
|
});
|
|
});
|