From 50908f2b8de0c4694b25af2fa4fe83c0b8619806 Mon Sep 17 00:00:00 2001 From: Diogo Soares Date: Thu, 18 Jan 2024 17:43:52 +0100 Subject: [PATCH] fix: use UTC in tests dates --- src/components/Blog/utils/__test__/formatBlogDate.test.ts | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/components/Blog/utils/__test__/formatBlogDate.test.ts b/src/components/Blog/utils/__test__/formatBlogDate.test.ts index c809036e8..2cace4bf4 100644 --- a/src/components/Blog/utils/__test__/formatBlogDate.test.ts +++ b/src/components/Blog/utils/__test__/formatBlogDate.test.ts @@ -2,28 +2,28 @@ import { formatBlogDate } from '@/components/Blog/utils/formatBlogDate' describe('formatBlogDate', () => { it('formats a valid date with a st day suffix', () => { - const inputDate = '2023-12-01T00:00+01:00' + const inputDate = '2023-12-01T00:00+00:00' const formattedDate = formatBlogDate(inputDate) expect(formattedDate).toBe('1st December, 2023') }) it('formats a valid date with a nd day suffix', () => { - const inputDate = '2023-12-02T00:00+01:00' + const inputDate = '2023-12-02T00:00+00:00' const formattedDate = formatBlogDate(inputDate) expect(formattedDate).toBe('2nd December, 2023') }) it('formats a valid date with a rd day suffix', () => { - const inputDate = '2023-12-03T00:00+01:00' + const inputDate = '2023-12-03T00:00+00:00' const formattedDate = formatBlogDate(inputDate) expect(formattedDate).toBe('3rd December, 2023') }) it('formats a valid date with a th day suffix', () => { - const inputDate = '2023-12-08T00:00+01:00' + const inputDate = '2023-12-08T00:00+00:00' const formattedDate = formatBlogDate(inputDate) expect(formattedDate).toBe('8th December, 2023')