diff --git a/next-ui/src/utils/i18n/locale-helper.test.ts b/next-ui/src/utils/i18n/locale-helper.test.ts index 9165452a..c3d04ae2 100644 --- a/next-ui/src/utils/i18n/locale-helper.test.ts +++ b/next-ui/src/utils/i18n/locale-helper.test.ts @@ -1,23 +1,21 @@ -import { afterEach, beforeEach, describe, expect, test, vi } from 'vitest' +import { afterEach, describe, expect, test, vi } from 'vitest' import { loadLocale, fallbackLocale, setLocale, getLocale, availableLocales } from './locale-helper' -describe('locale', () => { - beforeEach(() => { - // mock the available locales, as locales are checked against what's available - vi.mock('@/i18n?dir2json&ext=.json&1', () => { - return { - default: { - en: { - sample: 'sample', - }, - fr: { - sample: 'échantillon', - }, - } as Record>, - } - }) - }) +// mock the available locales, as locales are checked against what's available +vi.mock('@/i18n?dir2json&ext=.json&1', () => { + return { + default: { + en: { + sample: 'sample', + }, + fr: { + sample: 'échantillon', + }, + } as Record>, + } +}) +describe('locale', () => { afterEach(() => { localStorage.clear() })