From 440ce4e5563791c6e795a6331be66f9c1725190c Mon Sep 17 00:00:00 2001 From: simoleo89 Date: Fri, 11 Sep 2026 00:34:21 +0200 Subject: [PATCH] test(me): use committed translations in dashboard tests --- src/app/(site)/me/DashboardTasks.test.tsx | 11 ++--------- 1 file changed, 2 insertions(+), 9 deletions(-) diff --git a/src/app/(site)/me/DashboardTasks.test.tsx b/src/app/(site)/me/DashboardTasks.test.tsx index 61de5967..5d0686f2 100644 --- a/src/app/(site)/me/DashboardTasks.test.tsx +++ b/src/app/(site)/me/DashboardTasks.test.tsx @@ -34,15 +34,8 @@ vi.mock("@/components/link", () => ({ })); vi.mock("next-intl/server", () => ({ getTranslations: async () => { - const flat = JSON.parse( - readFileSync("docs/task-account-i18n.json", "utf8"), - ).it; - const messages = Object.fromEntries( - Object.entries(flat).map(([key, value]) => [ - key.replace("pages.myDashboard.tasks.", ""), - value, - ]), - ); + const messages = JSON.parse(readFileSync("src/messages/it.json", "utf8")) + .pages.myDashboard.tasks; return createTranslator({ locale: "it", messages }); }, getFormatter: async () => ({