Files
DeepTutor/web/tests/partial-locale-fallback.spec.ts
Bingxi Zhao (Frank) 8880529c65 Merge PR batch with local follow-up fixes
Preserve precise learner KB route guards, combine UI and response language domains, carry normalized EPUB extraction, and regenerate frontend contracts.

Update locale fallback coverage for the completed Ukrainian translation bundle.
2026-09-23 12:01:14 +08:00

20 lines
539 B
TypeScript

import { expect, it } from "vitest";
import { ensureLanguage, initI18n } from "@/i18n/init";
it("uses English copy for a missing French translation", async () => {
const i18n = initI18n("fr");
await ensureLanguage("fr");
await i18n.changeLanguage("fr");
expect(i18n.t("common.save")).toBe("Save");
});
it("uses Ukrainian copy when a translation exists", async () => {
const i18n = initI18n("uk");
await ensureLanguage("uk");
await i18n.changeLanguage("uk");
expect(i18n.t("common.save")).toBe("зберегти");
});