26 lines
999 B
TypeScript
26 lines
999 B
TypeScript
import { readFileSync } from "node:fs";
|
|
import { resolve } from "node:path";
|
|
import { describe, expect, it } from "vitest";
|
|
|
|
function readRoute(name: string): string {
|
|
return readFileSync(resolve(process.cwd(), `apps/web/app/routes/app.$tenant/${name}`), "utf8");
|
|
}
|
|
|
|
describe("task activity i18n", () => {
|
|
it("stores a locale-independent task creation key", () => {
|
|
const source = readRoute("tasks.new.tsx");
|
|
|
|
expect(source).toContain('summaryText: "crm.activity.task_created"');
|
|
expect(source).not.toContain('summaryText: t("crm.activity.task_created")');
|
|
expect(source).not.toContain('summaryText: "Aufgabe erstellt"');
|
|
});
|
|
|
|
it("stores a locale-independent task completion key", () => {
|
|
const source = readRoute("tasks.$id.tsx");
|
|
|
|
expect(source).toContain('summaryText: "crm.activity.task_completed"');
|
|
expect(source).not.toContain('summaryText: t("crm.activity.task_completed")');
|
|
expect(source).not.toContain('summaryText: "Aufgabe erledigt"');
|
|
});
|
|
});
|