test(me): use committed translations in dashboard tests
CI / check (push) Successful in 55s
CI / deploy (push) Successful in 19s
CI / publish-container (push) Successful in 1m23s

This commit is contained in:
Simo committed 2026-09-11 00:34:21 +02:00
1 parent a647b5451f
commit 440ce4e556
1 file changed
+2 -9
+2 -9
View File
@@ -34,15 +34,8 @@ vi.mock("@/components/link", () => ({
})); }));
vi.mock("next-intl/server", () => ({ vi.mock("next-intl/server", () => ({
getTranslations: async () => { getTranslations: async () => {
const flat = JSON.parse( const messages = JSON.parse(readFileSync("src/messages/it.json", "utf8"))
readFileSync("docs/task-account-i18n.json", "utf8"), .pages.myDashboard.tasks;
).it;
const messages = Object.fromEntries(
Object.entries(flat).map(([key, value]) => [
key.replace("pages.myDashboard.tasks.", ""),
value,
]),
);
return createTranslator({ locale: "it", messages }); return createTranslator({ locale: "it", messages });
}, },
getFormatter: async () => ({ getFormatter: async () => ({