Reorganize repo structure and standards references
This commit is contained in:
1 parent
3cb93a81be
commit
be2054274d
5885 files changed
+2588
-195
No files matched your search
+26
@@ -0,0 +1,26 @@
|
||||
import fs from "node:fs";
|
||||
import path from "node:path";
|
||||
|
||||
import { describe, expect, it } from "vitest";
|
||||
|
||||
import { defaultThemes } from "./defaultThemes";
|
||||
|
||||
const repoRoot = process.cwd();
|
||||
|
||||
function readSettings(locale: "de" | "en") {
|
||||
return JSON.parse(fs.readFileSync(path.join(repoRoot, `apps/web/public/locales/${locale}/settings.json`), "utf8")) as Record<string, string>;
|
||||
}
|
||||
|
||||
describe("default theme preset i18n", () => {
|
||||
it("keeps every visible preset label backed by English and German settings keys", () => {
|
||||
const en = readSettings("en");
|
||||
const de = readSettings("de");
|
||||
|
||||
for (const theme of defaultThemes) {
|
||||
expect(theme.labelKey).toBe(`settings:tenant.theme.presets.${theme.value}`);
|
||||
const localeKey = theme.labelKey.replace("settings:", "");
|
||||
expect(en[localeKey], `${theme.value} English label`).toBeTruthy();
|
||||
expect(de[localeKey], `${theme.value} German label`).toBeTruthy();
|
||||
}
|
||||
});
|
||||
});
|
||||
Reference in new issue
Block a user