From 33bb672ce5718461d1552ce2422bdab26cc7e0e5 Mon Sep 17 00:00:00 2001 From: asalem Date: Wed, 5 Aug 2020 04:52:01 -0700 Subject: [PATCH] chore(updated-comments): updated comments on tests and getTimezoneOffset --- ui/src/dashboards/selectors/index.test.ts | 4 ++-- ui/src/dashboards/utils/getTimezoneOffset.ts | 1 - 2 files changed, 2 insertions(+), 3 deletions(-) diff --git a/ui/src/dashboards/selectors/index.test.ts b/ui/src/dashboards/selectors/index.test.ts index 7a5d8112e0d..c89551942f8 100644 --- a/ui/src/dashboards/selectors/index.test.ts +++ b/ui/src/dashboards/selectors/index.test.ts @@ -135,7 +135,7 @@ describe('Dashboards.Selector', () => { upper: `2020-05-05T11:00:00Z`, type: 'custom', } - + // Offset for PST mocked(getTimezoneOffset).mockImplementation(() => 420) expect( @@ -166,7 +166,7 @@ describe('Dashboards.Selector', () => { upper: `2020-05-05T11:00:00Z`, type: 'custom', } - + // Offset for CET mocked(getTimezoneOffset).mockImplementation(() => -120) expect( diff --git a/ui/src/dashboards/utils/getTimezoneOffset.ts b/ui/src/dashboards/utils/getTimezoneOffset.ts index 2b6c2c207eb..b9e32e726d1 100644 --- a/ui/src/dashboards/utils/getTimezoneOffset.ts +++ b/ui/src/dashboards/utils/getTimezoneOffset.ts @@ -1,5 +1,4 @@ /** - * PLEASE READ * This files has been created as a way to effectively test * the getTimeRangeWithTimezone function since current system (circleCI, Jenkins) * and JS Date limitations prevent us from fully testing out its dependent functions