From db2cb2bc2d6ec7d91a9557547df6318631f3da48 Mon Sep 17 00:00:00 2001 From: Lucas Bordeau Date: Wed, 31 Jul 2024 11:50:55 +0200 Subject: [PATCH] Fixed format date unit test (#6469) With the introduction of the new function formatToHumanReadableTime, we had to modify a unit test that wasn't using a UTC date as input data. --- .../twenty-front/src/utils/format/__tests__/formatDate.test.ts | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/packages/twenty-front/src/utils/format/__tests__/formatDate.test.ts b/packages/twenty-front/src/utils/format/__tests__/formatDate.test.ts index 4e521a881..a0ca39d2f 100644 --- a/packages/twenty-front/src/utils/format/__tests__/formatDate.test.ts +++ b/packages/twenty-front/src/utils/format/__tests__/formatDate.test.ts @@ -22,8 +22,9 @@ describe('formatToHumanReadableDay', () => { describe('formatToHumanReadableTime', () => { it('should format the date to a human-readable time', () => { - const date = new Date('2022-01-01T12:30:00'); + const date = new Date('2022-01-01T12:30:00Z'); const result = formatToHumanReadableTime(date, 'UTC'); + // it seems when running locally on MacOS the space is not the same expect(['12:30 PM', '12:30 PM']).toContain(result); });