fix: add JSDoc header and null input test for rarity config

This commit is contained in:
syntaxbullet
2026-03-18 21:49:10 +01:00
parent b8303a7e28
commit 0517cd638c
2 changed files with 10 additions and 0 deletions

View File

@@ -18,6 +18,11 @@ describe("getRarityConfig", () => {
const result = getRarityConfig("LEGENDARY");
expect(result).toEqual(RARITY_CONFIG["C"]);
});
it("falls back to Common for null/undefined input", () => {
expect(getRarityConfig(null as any)).toEqual(RARITY_CONFIG["C"]);
expect(getRarityConfig(undefined as any)).toEqual(RARITY_CONFIG["C"]);
});
});
describe("defaultName", () => {