19 lines
754 B
TypeScript
19 lines
754 B
TypeScript
import fs from "node:fs";
|
|
import path from "node:path";
|
|
import { describe, expect, it } from "vitest";
|
|
|
|
const sourcePath = path.resolve(process.cwd(), "apps/web/app/modules/jsonProperties/components/JsonPropertiesTable.tsx");
|
|
|
|
describe("json properties table i18n", () => {
|
|
it("uses semantic translation keys for property badges", () => {
|
|
const source = fs.readFileSync(sourcePath, "utf8");
|
|
|
|
expect(source).toContain("models.jsonProperty.badges.range");
|
|
expect(source).toContain("models.jsonProperty.fields.type");
|
|
expect(source).toContain("models.jsonProperty.fields.name");
|
|
expect(source).not.toContain('" (range)"');
|
|
expect(source).not.toContain('title: "Type"');
|
|
expect(source).not.toContain('title: "Name"');
|
|
});
|
|
});
|