test: add unit tests for pure logic modules

Add 22 test files covering imager, soundtracks, browser-headers, source-keys (figure/pet/effect), effect-source, plus catalog-translations, catalog-layouts, client-translation-files, translations-utils, and various admin/services/helpers modules. Total test count increases by 120+.
This commit is contained in:
openhands committed 2026-08-07 18:53:59 +02:00
1 parent 11e8b06bf8
commit 82e8448f26
25 files changed
+1400 -304

No files matched your search

+6 -2
View File
@@ -2,15 +2,19 @@ import { describe, expect, it } from "vitest";
import { CurrencyType, currencyLabel } from "./currency";
describe("CurrencyType", () => {
it("uses the emulator-fixed numeric values", () => {
it("keeps emulator-dictated numeric values", () => {
expect(CurrencyType.Credits).toBe(-1);
expect(CurrencyType.Duckets).toBe(0);
expect(CurrencyType.Diamonds).toBe(5);
expect(CurrencyType.Points).toBe(101);
});
});
it("maps each type to a human label", () => {
describe("currencyLabel", () => {
it("returns friendly labels for each currency", () => {
expect(currencyLabel(CurrencyType.Credits)).toBe("Credits");
expect(currencyLabel(CurrencyType.Duckets)).toBe("Duckets");
expect(currencyLabel(CurrencyType.Diamonds)).toBe("Diamonds");
expect(currencyLabel(CurrencyType.Points)).toBe("Points");
});
});