From 77b719c23e6a7350fa76d32633596e366b4ed488 Mon Sep 17 00:00:00 2001 From: Charles Bochet Date: Sun, 13 Oct 2024 10:08:32 +0200 Subject: [PATCH] Add tests to pass coverage --- .../__tests__/findAvailableTimeZoneOption.test.ts | 15 +++++++++++++++ 1 file changed, 15 insertions(+) create mode 100644 packages/twenty-front/src/modules/localization/utils/__tests__/findAvailableTimeZoneOption.test.ts diff --git a/packages/twenty-front/src/modules/localization/utils/__tests__/findAvailableTimeZoneOption.test.ts b/packages/twenty-front/src/modules/localization/utils/__tests__/findAvailableTimeZoneOption.test.ts new file mode 100644 index 000000000000..fa2bc25078e6 --- /dev/null +++ b/packages/twenty-front/src/modules/localization/utils/__tests__/findAvailableTimeZoneOption.test.ts @@ -0,0 +1,15 @@ +import { findAvailableTimeZoneOption } from '@/localization/utils/findAvailableTimeZoneOption'; + +describe('findAvailableTimeZoneOption', () => { + it('should find the matching available IANA time zone select option from a given IANA time zone', () => { + const ianaTimeZone = 'Europe/Paris'; + const expectedOption = { + label: '(GMT+02:00) Central European Summer Time - Paris', + value: 'Europe/Paris', + }; + + const option = findAvailableTimeZoneOption(ianaTimeZone); + + expect(option).toEqual(expectedOption); + }); +});