diff options
author | GitLab Bot <gitlab-bot@gitlab.com> | 2022-05-19 10:33:21 +0300 |
---|---|---|
committer | GitLab Bot <gitlab-bot@gitlab.com> | 2022-05-19 10:33:21 +0300 |
commit | 36a59d088eca61b834191dacea009677a96c052f (patch) | |
tree | e4f33972dab5d8ef79e3944a9f403035fceea43f /spec/frontend/frequent_items/components/app_spec.js | |
parent | a1761f15ec2cae7c7f7bbda39a75494add0dfd6f (diff) |
Add latest changes from gitlab-org/gitlab@15-0-stable-eev15.0.0-rc42
Diffstat (limited to 'spec/frontend/frequent_items/components/app_spec.js')
-rw-r--r-- | spec/frontend/frequent_items/components/app_spec.js | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/spec/frontend/frequent_items/components/app_spec.js b/spec/frontend/frequent_items/components/app_spec.js index ba989bf53ab..32c66c0d288 100644 --- a/spec/frontend/frequent_items/components/app_spec.js +++ b/spec/frontend/frequent_items/components/app_spec.js @@ -6,7 +6,7 @@ import { mountExtended } from 'helpers/vue_test_utils_helper'; import waitForPromises from 'helpers/wait_for_promises'; import App from '~/frequent_items/components/app.vue'; import FrequentItemsList from '~/frequent_items/components/frequent_items_list.vue'; -import { FREQUENT_ITEMS, HOUR_IN_MS } from '~/frequent_items/constants'; +import { FREQUENT_ITEMS, FIFTEEN_MINUTES_IN_MS } from '~/frequent_items/constants'; import eventHub from '~/frequent_items/event_hub'; import { createStore } from '~/frequent_items/store'; import { getTopFrequentItems } from '~/frequent_items/utils'; @@ -200,15 +200,15 @@ describe('Frequent Items App Component', () => { ]); }); - it('should increase frequency, when created an hour later', () => { - const hourLater = Date.now() + HOUR_IN_MS + 1; + it('should increase frequency, when created 15 minutes later', () => { + const fifteenMinutesLater = Date.now() + FIFTEEN_MINUTES_IN_MS + 1; - jest.spyOn(Date, 'now').mockReturnValue(hourLater); - createComponent({ currentItem: { ...TEST_PROJECT, lastAccessedOn: hourLater } }); + jest.spyOn(Date, 'now').mockReturnValue(fifteenMinutesLater); + createComponent({ currentItem: { ...TEST_PROJECT, lastAccessedOn: fifteenMinutesLater } }); expect(getStoredProjects()).toEqual([ expect.objectContaining({ - lastAccessedOn: hourLater, + lastAccessedOn: fifteenMinutesLater, frequency: 2, }), ]); |