Files
EpicNext-Cms/src/lib/services/currency.test.ts
T
openhands 82e8448f26 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+.
2026-08-07 18:53:59 +02:00

21 lines
718 B
TypeScript

import { describe, expect, it } from "vitest";
import { CurrencyType, currencyLabel } from "./currency";
describe("CurrencyType", () => {
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);
});
});
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");
});
});