diff options
author | GitLab Bot <gitlab-bot@gitlab.com> | 2019-09-28 00:06:33 +0300 |
---|---|---|
committer | GitLab Bot <gitlab-bot@gitlab.com> | 2019-09-28 00:06:33 +0300 |
commit | d4633b0e70ec39583ce0b13f277f990b216ac0d9 (patch) | |
tree | cd2625006dc8ad708cc870bfbb7d0c3f4df76987 /spec | |
parent | 2abb1b54c0305b359b178d6660810e865f619c22 (diff) |
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'spec')
-rw-r--r-- | spec/frontend/lib/utils/datetime_utility_spec.js | 11 |
1 files changed, 8 insertions, 3 deletions
diff --git a/spec/frontend/lib/utils/datetime_utility_spec.js b/spec/frontend/lib/utils/datetime_utility_spec.js index 80d1dff676b..e2e71229320 100644 --- a/spec/frontend/lib/utils/datetime_utility_spec.js +++ b/spec/frontend/lib/utils/datetime_utility_spec.js @@ -428,11 +428,16 @@ describe('newDate', () => { }); describe('getDateInPast', () => { + const date = new Date(1563235200000); // 2019-07-16T00:00:00.000Z; + const daysInPast = 90; + it('returns the correct date in the past', () => { - const date = new Date(1563235200000); // 2019-07-16T00:00:00.00Z - const daysInPast = 90; const dateInPast = datetimeUtility.getDateInPast(date, daysInPast); - expect(dateInPast).toBe('2019-04-17T00:00:00.000Z'); }); + + it('does not modifiy the original date', () => { + datetimeUtility.getDateInPast(date, daysInPast); + expect(date).toStrictEqual(new Date(1563235200000)); + }); }); |