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

+28
View File
@@ -0,0 +1,28 @@
import { describe, expect, it } from "vitest";
import { CATALOG_LAYOUTS, LAYOUT_DESCRIPTIONS } from "./catalog-layouts";
describe("CATALOG_LAYOUTS", () => {
it("contains the common Habbo layouts", () => {
for (const layout of [
"frontpage",
"default_3x3",
"spaces_new",
"marketplace",
"room_bundle",
]) {
expect(CATALOG_LAYOUTS).toContain(layout);
}
});
it("has a description for every layout", () => {
for (const layout of CATALOG_LAYOUTS) {
expect(LAYOUT_DESCRIPTIONS[layout]).toBeTruthy();
}
});
it("descriptions are non-empty", () => {
for (const desc of Object.values(LAYOUT_DESCRIPTIONS)) {
expect(desc.length).toBeGreaterThan(0);
}
});
});