import { describe, expect, it } from "vitest"; import { loadCoaAbilityCatalogShard } from "./coaAbilityCatalogLoader"; import { COA_RUNTIME_ABILITIES_BY_CLASS, COA_RUNTIME_CLASS_RESOURCES, } from "./coaAbilityRuntimeCatalog"; describe("Conquest ability catalog shards", () => { it.each(["barbarian", "runemaster"] as const)("loads only the %s executable catalog", async (classId) => { const shard = await loadCoaAbilityCatalogShard(classId); expect(shard.classId).toBe(classId); expect(shard.abilities).toEqual(COA_RUNTIME_ABILITIES_BY_CLASS[classId]); expect(shard.resource).toEqual(COA_RUNTIME_CLASS_RESOURCES[classId]); expect(Object.values(shard.triggeredAbilitiesBySpellId).every((ability) => ( ability.classId === classId ))).toBe(true); }); });