chore: initialize project
Some checks failed
Deploy monie-landing (kaniko) / build-and-deploy (push) Failing after 1m46s

This commit is contained in:
2026-04-03 16:32:58 +03:00
commit 014058071a
78 changed files with 12498 additions and 0 deletions

View File

@@ -0,0 +1,33 @@
import { readFileSync } from "node:fs";
import { resolve } from "node:path";
import { describe, expect, it } from "vitest";
function readMessages(locale: "ru" | "en") {
const filepath = resolve(process.cwd(), "messages", `${locale}.json`);
return JSON.parse(readFileSync(filepath, "utf-8")) as Record<string, string>;
}
describe("message catalogs", () => {
it("have the same keyset for ru and en", () => {
const ru = readMessages("ru");
const en = readMessages("en");
const ruKeys = Object.keys(ru).sort();
const enKeys = Object.keys(en).sort();
expect(ruKeys).toEqual(enKeys);
});
it("have non-empty translations", () => {
const catalogs = [readMessages("ru"), readMessages("en")];
for (const catalog of catalogs) {
for (const [key, value] of Object.entries(catalog)) {
expect(
value.trim().length,
`Empty translation for key: ${key}`,
).toBeGreaterThan(0);
}
}
});
});