Update class mechanics, stat rulesets, and CoA reference catalogs
This commit is contained in:
1 parent
b16821e92e
commit
39458d5de6
221 files changed
+2584962
-568
No files matched your search
@@ -0,0 +1,30 @@
|
||||
import { describe, expect, it } from "vitest";
|
||||
import type { ClassId, RaceId } from "../app/characterCatalog";
|
||||
import fixture from "./generated/characterStatRulesetCompatibility.json";
|
||||
import type { ItemStats } from "./itemStats";
|
||||
import { deriveCharacterStats } from "./wotlkStats";
|
||||
|
||||
describe("saved-character stat compatibility", () => {
|
||||
for (const row of fixture.rows) {
|
||||
it(`preserves frozen ${row.classId} level ${row.level} stats with and without an explicit WoW profile`, () => {
|
||||
const args = [
|
||||
row.classId as ClassId,
|
||||
row.level,
|
||||
fixture.gear as ItemStats,
|
||||
row.raceId as RaceId,
|
||||
fixture.modifiers,
|
||||
row.secondaryClassId as ClassId | null,
|
||||
] as const;
|
||||
for (const stats of [
|
||||
deriveCharacterStats(...args),
|
||||
deriveCharacterStats(...args, undefined, "wow"),
|
||||
]) {
|
||||
// Compare the pre-existing outputs; extra ruleset metadata may be added.
|
||||
expect(Object.fromEntries(Object.keys(row.expected).map((key) => [
|
||||
key,
|
||||
stats[key as keyof typeof stats],
|
||||
]))).toEqual(row.expected);
|
||||
}
|
||||
});
|
||||
}
|
||||
});
|
||||
Reference in new issue
Block a user