Agent-Logs-Url: https://github.com/trails-cool/trails/sessions/7546ba18-5628-4f50-bc8b-104fa7ba6afe Co-authored-by: stigi <13815+stigi@users.noreply.github.com>
16 lines
420 B
TypeScript
16 lines
420 B
TypeScript
/**
|
|
* @vitest-environment jsdom
|
|
*/
|
|
import { describe, expect, it } from "vitest";
|
|
import { i18n, initI18nClient } from "./index.ts";
|
|
|
|
describe("initI18nClient", () => {
|
|
it("normalizes regional html lang tags to supported languages", () => {
|
|
document.documentElement.lang = "de-DE";
|
|
|
|
initI18nClient();
|
|
|
|
expect(i18n.language).toBe("de");
|
|
expect(i18n.t("journal:nav.login")).toBe("Anmelden");
|
|
});
|
|
});
|