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); + }); +});