From 8f300c7163c481b1df724857070650d40dc1f1f2 Mon Sep 17 00:00:00 2001 From: Christian Byrne Date: Mon, 8 Dec 2025 23:35:37 -0800 Subject: [PATCH] fix: release notifications unit tests missing i18n mocks (#7281) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit ## Summary - Fix missing `i18n` export in `@/i18n` mock for WhatsNewPopup tests - Fix missing `createI18n` export in `vue-i18n` mock for ReleaseNotificationToast tests ┆Issue is synchronized with this [Notion page](https://www.notion.so/PR-7281-fix-release-notifications-unit-tests-missing-i18n-mocks-2c46d73d365081e595eadaca6a4ace5d) by [Unito](https://www.unito.io) --- .../updates/components/ReleaseNotificationToast.test.ts | 5 +++++ src/platform/updates/components/WhatsNewPopup.test.ts | 7 +++++++ 2 files changed, 12 insertions(+) diff --git a/src/platform/updates/components/ReleaseNotificationToast.test.ts b/src/platform/updates/components/ReleaseNotificationToast.test.ts index 17373adb4..021772ae2 100644 --- a/src/platform/updates/components/ReleaseNotificationToast.test.ts +++ b/src/platform/updates/components/ReleaseNotificationToast.test.ts @@ -20,6 +20,11 @@ vi.mock('vue-i18n', () => ({ } return translations[key] || key }) + })), + createI18n: vi.fn(() => ({ + global: { + locale: { value: 'en' } + } })) })) diff --git a/src/platform/updates/components/WhatsNewPopup.test.ts b/src/platform/updates/components/WhatsNewPopup.test.ts index e2ed7fa85..4d2f7ee90 100644 --- a/src/platform/updates/components/WhatsNewPopup.test.ts +++ b/src/platform/updates/components/WhatsNewPopup.test.ts @@ -16,6 +16,13 @@ const mockTranslations: Record = { } vi.mock('@/i18n', () => ({ + i18n: { + global: { + locale: { + value: 'en' + } + } + }, t: (key: string, params?: Record) => { return params ? `${mockTranslations[key] || key}:${JSON.stringify(params)}`