test(me): use committed translations in dashboard tests
This commit is contained in:
1 parent
a647b5451f
commit
440ce4e556
1 file changed
+2
-9
@@ -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 () => ({
|
||||
|
||||
Reference in new issue
Block a user