diff options
Diffstat (limited to 'spec/frontend/lib/utils/datetime_utility_spec.js')
-rw-r--r-- | spec/frontend/lib/utils/datetime_utility_spec.js | 17 |
1 files changed, 3 insertions, 14 deletions
diff --git a/spec/frontend/lib/utils/datetime_utility_spec.js b/spec/frontend/lib/utils/datetime_utility_spec.js index 6180cd8e94d..df0ccb19cb7 100644 --- a/spec/frontend/lib/utils/datetime_utility_spec.js +++ b/spec/frontend/lib/utils/datetime_utility_spec.js @@ -101,13 +101,13 @@ describe('Date time utils', () => { it('should format date properly', () => { const formattedDate = datetimeUtility.formatDate(new Date('07/23/2016')); - expect(formattedDate).toBe('Jul 23, 2016 12:00am GMT+0000'); + expect(formattedDate).toBe('Jul 23, 2016 12:00am UTC'); }); it('should format ISO date properly', () => { const formattedDate = datetimeUtility.formatDate('2016-07-23T00:00:00.559Z'); - expect(formattedDate).toBe('Jul 23, 2016 12:00am GMT+0000'); + expect(formattedDate).toBe('Jul 23, 2016 12:00am UTC'); }); it('should throw an error if date is invalid', () => { @@ -878,7 +878,7 @@ describe('localTimeAgo', () => { it.each` timeagoArg | title ${false} | ${'some time'} - ${true} | ${'Feb 18, 2020 10:22pm GMT+0000'} + ${true} | ${'Feb 18, 2020 10:22pm UTC'} `('converts $seconds seconds to $approximation', ({ timeagoArg, title }) => { const element = document.querySelector('time'); datetimeUtility.localTimeAgo($(element), timeagoArg); @@ -889,17 +889,6 @@ describe('localTimeAgo', () => { }); }); -describe('dateFromParams', () => { - it('returns the expected date object', () => { - const expectedDate = new Date('2019-07-17T00:00:00.000Z'); - const date = datetimeUtility.dateFromParams(2019, 6, 17); - - expect(date.getYear()).toBe(expectedDate.getYear()); - expect(date.getMonth()).toBe(expectedDate.getMonth()); - expect(date.getDate()).toBe(expectedDate.getDate()); - }); -}); - describe('differenceInSeconds', () => { const startDateTime = new Date('2019-07-17T00:00:00.000Z'); |