1 import { setDateLocales } from '@proton/shared/lib/i18n'
2 import { NativeVersionHistory } from './NativeVersionHistory'
4 describe('NativeVersionHistory', () => {
5 describe('getFormattedBatchGroups', () => {
6 jest.useFakeTimers().setSystemTime(new Date('2023-07-08'))
7 setDateLocales({ dateLocale: { code: 'en-US' } })
8 const versionHistory = new NativeVersionHistory([
10 content: new Uint8Array(),
11 timestamp: +new Date('2023-01-01T01:00'),
15 it('Returns formatted dates and times for all the batches', () => {
16 expect(versionHistory.getFormattedBatchGroups()).toEqual([
18 formattedDate: 'Jan 1',
19 batchIndexes: [{ formattedTime: '1:00 AM', batchIndex: 0 }],