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
diff options
context:
space:
mode:
authorGitLab Bot <gitlab-bot@gitlab.com>2020-04-22 12:09:36 +0300
committerGitLab Bot <gitlab-bot@gitlab.com>2020-04-22 12:09:36 +0300
commitaf5fb16f2a9fca958017aade72cf7133e986bc2c (patch)
tree007dcd6a8ae64239f7f89666a8d3a6f440404778 /spec/javascripts
parent66b52237fd4f10a62afef61034e90f68cb9363a9 (diff)
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'spec/javascripts')
-rw-r--r--spec/javascripts/line_highlighter_spec.js10
1 files changed, 10 insertions, 0 deletions
diff --git a/spec/javascripts/line_highlighter_spec.js b/spec/javascripts/line_highlighter_spec.js
index 45b10fc3bd8..661d99197b7 100644
--- a/spec/javascripts/line_highlighter_spec.js
+++ b/spec/javascripts/line_highlighter_spec.js
@@ -67,6 +67,16 @@ describe('LineHighlighter', function() {
expect(func).not.toThrow();
});
+
+ it('handles hashchange event', () => {
+ const highlighter = new LineHighlighter();
+
+ spyOn(highlighter, 'highlightHash');
+
+ window.dispatchEvent(new Event('hashchange'), 'L15');
+
+ expect(highlighter.highlightHash).toHaveBeenCalled();
+ });
});
describe('clickHandler', function() {