From 898e2cc1dfa88b4ac39cb4b35011f61b37f57b51 Mon Sep 17 00:00:00 2001 From: GitLab Bot Date: Fri, 20 Dec 2019 09:24:38 +0000 Subject: Add latest changes from gitlab-org/gitlab@master --- spec/javascripts/lib/utils/common_utils_spec.js | 3 +++ 1 file changed, 3 insertions(+) (limited to 'spec/javascripts/lib/utils/common_utils_spec.js') diff --git a/spec/javascripts/lib/utils/common_utils_spec.js b/spec/javascripts/lib/utils/common_utils_spec.js index e471be608c8..1d91b508b71 100644 --- a/spec/javascripts/lib/utils/common_utils_spec.js +++ b/spec/javascripts/lib/utils/common_utils_spec.js @@ -88,10 +88,12 @@ describe('common_utils', () => { describe('handleLocationHash', () => { beforeEach(() => { spyOn(window.document, 'getElementById').and.callThrough(); + jasmine.clock().install(); }); afterEach(() => { window.history.pushState({}, null, ''); + jasmine.clock().uninstall(); }); function expectGetElementIdToHaveBeenCalledWith(elementId) { @@ -171,6 +173,7 @@ describe('common_utils', () => { window.history.pushState({}, null, '#test'); commonUtils.handleLocationHash(); + jasmine.clock().tick(1); expectGetElementIdToHaveBeenCalledWith('test'); expectGetElementIdToHaveBeenCalledWith('user-content-test'); -- cgit v1.2.1