Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
path: root/spec
diff options
context:
space:
mode:
authorGitLab Bot <gitlab-bot@gitlab.com>2019-09-28 00:06:33 +0300
committerGitLab Bot <gitlab-bot@gitlab.com>2019-09-28 00:06:33 +0300
commitd4633b0e70ec39583ce0b13f277f990b216ac0d9 (patch)
treecd2625006dc8ad708cc870bfbb7d0c3f4df76987 /spec
parent2abb1b54c0305b359b178d6660810e865f619c22 (diff)
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'spec')
-rw-r--r--spec/frontend/lib/utils/datetime_utility_spec.js11
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));
+ });
});