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>
15 lines
384 B
TypeScript
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);
|
|
});
|
|
});
|