Files
m3e-canvas/web/vendor/lib/i18n.test.ts
T
pastilhasandClaude Fable 5 240d63940d vendor m3e-canvas 5c83ac6, with the import rewrite scripted
upstream imports through a @/ alias, and this platform already binds
@/* to src/apps/officer-web and @/components/* to its own shared
components — so an unrewritten import resolves to the WRONG module
rather than failing. the rewrite is mechanical and lives in
scripts/vendor.sh so a re-vendor produces a readable diff.

lib/ai.ts and AiPanel are vendored despite being unwanted: deleting them
meant editing vendored code, and Canvas.tsx references them throughout.
a faithful copy carrying an unused module beats a doctored one.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
2026-09-05 12:00:17 +01:00

15 lines
384 B
TypeScript

import { describe, it, expect } from "vitest";
import { isLang, LANGS } from "./i18n";
describe("isLang", () => {
it("accepts every language the UI offers", () => {
for (const { key } of LANGS) expect(isLang(key)).toBe(true);
});
it("rejects anything else", () => {
expect(isLang("fr")).toBe(false);
expect(isLang(undefined)).toBe(false);
});
});