fix: add JSDoc header and null input test for rarity config
This commit is contained in:
@@ -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", () => {
|
||||
|
||||
Reference in New Issue
Block a user