Files
HiveGrid-Wireframes/03 Quellen und Referenzen/hivegrid-cloud/apps/web/app/components/screens/files/files-i18n-fallbacks.test.ts
T

18 lines
694 B
TypeScript

import { readFileSync } from "node:fs";
import { resolve } from "node:path";
import { describe, expect, it } from "vitest";
function readComponent(name: string): string {
return readFileSync(resolve(process.cwd(), `apps/web/app/components/screens/files/${name}`), "utf8");
}
describe("file entity type i18n fallbacks", () => {
it("never exposes an unknown persisted entity type as UI copy", () => {
for (const name of ["FilesBrowserPage.tsx", "FileDetailPage.tsx"]) {
const source = readComponent(name);
expect(source).toContain('defaultValue: t("files.entityType.unknown")');
expect(source).not.toMatch(/defaultValue:\s*(?:type|link\.entityType)/);
}
});
});