From 26571454d4f5b9331e0962672e29ef6d4e80a63c Mon Sep 17 00:00:00 2001 From: Marc Lundgren Date: Fri, 29 Mar 2024 21:20:32 -0700 Subject: [PATCH] add test that has a broken case. next commit will be the fix --- .../dateToLocaleISOString.newfoundland.spec.js | 14 ++++++++++++++ 1 file changed, 14 insertions(+) create mode 100644 packages/core/src/utils/dateToLocaleISOString.newfoundland.spec.js diff --git a/packages/core/src/utils/dateToLocaleISOString.newfoundland.spec.js b/packages/core/src/utils/dateToLocaleISOString.newfoundland.spec.js new file mode 100644 index 0000000000..a2f1132c7a --- /dev/null +++ b/packages/core/src/utils/dateToLocaleISOString.newfoundland.spec.js @@ -0,0 +1,14 @@ +/** + * @jest-environment ../../../__tests__/setup/jestNodeEnvironmentWithTimezone.js + * @timezone America/St_Johns + */ + +import dateToLocaleISOString from './dateToLocaleISOString'; + +test('formatting a time in Cananda, Newfoundland timezone', () => { + // eslint-disable-next-line no-magic-numbers + const date = new Date(Date.UTC(2000, 0, 1, 0, 12, 34, 567)); + const actual = dateToLocaleISOString(date); + + expect(actual).toMatchInlineSnapshot(`"2000-01-01T09:12:34.567-03:30"`); +});