mirror of
https://github.com/diegosouzapw/OmniRoute.git
synced 2026-07-26 09:52:11 +03:00
Release v3.8.33 — full CHANGELOG in the PR body. Blocking gates green (Build, Lint, Unit Tests 8/8, Package Artifact, Quality Gates, Quality Ratchet, Docs Sync, PR Test Policy, test-vitest). Admin-merged over a Node 26 future-compat timer flake (1/4) + an E2E UI flake (3/9) — both verified non-deterministic; full test:unit validated locally (16936 pass).
37 lines
1.1 KiB
TypeScript
37 lines
1.1 KiB
TypeScript
import test from "node:test";
|
|
import assert from "node:assert/strict";
|
|
|
|
import i18nConfig from "../../config/i18n.json" with { type: "json" };
|
|
import {
|
|
DEFAULT_LOCALE,
|
|
LANGUAGES,
|
|
LOCALES,
|
|
LOCALE_COOKIE,
|
|
RTL_LOCALES,
|
|
} from "../../src/i18n/config.ts";
|
|
|
|
test("i18n config adapter reflects the JSON source of truth", () => {
|
|
assert.deepEqual(
|
|
LOCALES,
|
|
i18nConfig.locales.map((locale) => locale.code)
|
|
);
|
|
assert.equal(DEFAULT_LOCALE, i18nConfig.default);
|
|
assert.deepEqual(RTL_LOCALES, i18nConfig.rtl);
|
|
assert.equal(LOCALE_COOKIE, "NEXT_LOCALE");
|
|
});
|
|
|
|
test("i18n language metadata preserves native and English names", () => {
|
|
assert.equal(LANGUAGES.length, i18nConfig.locales.length);
|
|
|
|
const english = LANGUAGES.find((language) => language.code === "en");
|
|
const englishConfig = i18nConfig.locales.find((language) => language.code === "en");
|
|
assert.deepEqual(english, {
|
|
code: "en",
|
|
label: englishConfig?.label,
|
|
name: englishConfig?.name,
|
|
native: englishConfig?.native,
|
|
english: englishConfig?.english,
|
|
flag: englishConfig?.flag,
|
|
});
|
|
});
|