forked from phenom/healer-man
Release Healer Man 0.1.7
This commit is contained in:
1 parent
b12fb84859
commit
eca6b5db9b
99 files changed
+1931
-150
No files matched your search
@@ -0,0 +1,20 @@
|
||||
import { describe, expect, it } from "vitest";
|
||||
import { TALENT_NODES, TALENT_TREES } from "./talentCatalog";
|
||||
import { loadTalentUiCatalog, talentUiNodesForTree } from "./talentUiCatalog";
|
||||
|
||||
describe("talent UI catalog shards", () => {
|
||||
it.each(["warrior", "barbarian"] as const)("loads only the %s class projection", async (classId) => {
|
||||
const catalog = await loadTalentUiCatalog(classId);
|
||||
const sourceTrees = TALENT_TREES.filter((tree) => tree.classId === classId);
|
||||
const sourceTreeIds = new Set(sourceTrees.map((tree) => tree.id));
|
||||
const sourceNodes = TALENT_NODES.filter((node) => sourceTreeIds.has(node.treeId));
|
||||
|
||||
expect(catalog.classId).toBe(classId);
|
||||
expect(catalog.trees.map((tree) => tree.id)).toEqual(sourceTrees.map((tree) => tree.id));
|
||||
expect(catalog.nodes.map((node) => node.id)).toEqual(sourceNodes.map((node) => node.id));
|
||||
expect(catalog.nodes.every((node) => !("rankEffects" in node))).toBe(true);
|
||||
for (const tree of catalog.trees) {
|
||||
expect(talentUiNodesForTree(catalog, tree.id).every((node) => node.treeId === tree.id)).toBe(true);
|
||||
}
|
||||
});
|
||||
});
|
||||
Reference in new issue
Block a user