diff --git a/apps/web/src/features/history/HistoryBoard.tsx b/apps/web/src/features/history/HistoryBoard.tsx index 629c852..f7ef0b2 100644 --- a/apps/web/src/features/history/HistoryBoard.tsx +++ b/apps/web/src/features/history/HistoryBoard.tsx @@ -168,10 +168,7 @@ export function HistoryBoard() { - diff --git a/apps/web/src/lib/i18n/formatDateTime.test.ts b/apps/web/src/lib/i18n/formatDateTime.test.ts index 68c48a1..7ac8582 100644 --- a/apps/web/src/lib/i18n/formatDateTime.test.ts +++ b/apps/web/src/lib/i18n/formatDateTime.test.ts @@ -20,15 +20,16 @@ describe('formatLocalDateTime', () => { it('prefers navigator.language when navigator.languages is empty', () => { let observedLocales: Intl.LocalesArgument | undefined let observedOptions: Intl.DateTimeFormatOptions | undefined - const DateTimeFormatMock = vi - .spyOn(Intl, 'DateTimeFormat') - .mockImplementation(function (locales?: Intl.LocalesArgument, options?: Intl.DateTimeFormatOptions) { - observedLocales = locales - observedOptions = options - return { - format: () => 'formatted', - } as Intl.DateTimeFormat - }) + const DateTimeFormatMock = vi.spyOn(Intl, 'DateTimeFormat').mockImplementation(function ( + locales?: Intl.LocalesArgument, + options?: Intl.DateTimeFormatOptions, + ) { + observedLocales = locales + observedOptions = options + return { + format: () => 'formatted', + } as Intl.DateTimeFormat + }) Object.defineProperty(globalThis, 'navigator', { configurable: true, @@ -50,15 +51,16 @@ describe('formatLocalDateTime', () => { it('falls back to an undefined locale list when navigator is unavailable', () => { let observedLocales: Intl.LocalesArgument | undefined let observedOptions: Intl.DateTimeFormatOptions | undefined - const DateTimeFormatMock = vi - .spyOn(Intl, 'DateTimeFormat') - .mockImplementation(function (locales?: Intl.LocalesArgument, options?: Intl.DateTimeFormatOptions) { - observedLocales = locales - observedOptions = options - return { - format: () => 'formatted', - } as Intl.DateTimeFormat - }) + const DateTimeFormatMock = vi.spyOn(Intl, 'DateTimeFormat').mockImplementation(function ( + locales?: Intl.LocalesArgument, + options?: Intl.DateTimeFormatOptions, + ) { + observedLocales = locales + observedOptions = options + return { + format: () => 'formatted', + } as Intl.DateTimeFormat + }) Object.defineProperty(globalThis, 'navigator', { configurable: true,