Local Build and Deploy / deploy (push) Failing after 33s
Furni name suggestions, import enrichment, and badge texts now follow habbo_gamedata_hotel instead of hardcoded habbo.it. Co-authored-by: Cursor <[email protected]>
31 lines
959 B
TypeScript
31 lines
959 B
TypeScript
import { describe, expect, it } from "vitest";
|
|
import {
|
|
habboExternalTextsUrl,
|
|
habboFurnidataUrl,
|
|
habboGamedataHotelShort,
|
|
normalizeHabboGamedataHotel,
|
|
} from "./habbo-gamedata-hotel";
|
|
|
|
describe("habbo-gamedata-hotel", () => {
|
|
it("normalizes known hotels and falls back to it", () => {
|
|
expect(normalizeHabboGamedataHotel("ES")).toBe("es");
|
|
expect(normalizeHabboGamedataHotel("com.br")).toBe("com.br");
|
|
expect(normalizeHabboGamedataHotel("nope")).toBe("it");
|
|
expect(normalizeHabboGamedataHotel(null)).toBe("it");
|
|
});
|
|
|
|
it("builds official gamedata URLs", () => {
|
|
expect(habboFurnidataUrl("de")).toBe(
|
|
"https://www.habbo.de/gamedata/furnidata_json/1",
|
|
);
|
|
expect(habboExternalTextsUrl("com.br")).toBe(
|
|
"https://www.habbo.com.br/gamedata/external_flash_texts/1",
|
|
);
|
|
});
|
|
|
|
it("formats short hotel labels", () => {
|
|
expect(habboGamedataHotelShort("it")).toBe("IT");
|
|
expect(habboGamedataHotelShort("com.br")).toBe("COM.BR");
|
|
});
|
|
});
|