Skip to content

Commit

Permalink
Fix mock
Browse files Browse the repository at this point in the history
Signed-off-by: Lucas ONeil <[email protected]>
  • Loading branch information
loneil committed Jan 5, 2024
1 parent 582eb55 commit 227be74
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
2 changes: 1 addition & 1 deletion services/tenant-ui/frontend/src/helpers/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ function i18n2DateLocale(i18nLocale: I18nLocale): Locale {
}

function _dateFnsFormat(value: string, formatter: string) {
const locale: any = i18n.global.locale;
const locale: any = i18n.global?.locale || '';
const formatted = '';
try {
if (value) {
Expand Down
1 change: 1 addition & 0 deletions services/tenant-ui/frontend/test/setupGlobalMocks.ts
Original file line number Diff line number Diff line change
Expand Up @@ -76,6 +76,7 @@ vi.mock('@/store', () => ({
}));

vi.mock('vue-i18n', () => ({
createI18n: vi.fn(() => ({})),
useI18n: vi.fn(() => ({
locale: vi.fn(() => 'en'),
t: vi.fn((key: string) => key),
Expand Down

0 comments on commit 227be74

Please sign in to comment.