diff options
author | GitLab Bot <gitlab-bot@gitlab.com> | 2020-04-22 09:09:36 +0000 |
---|---|---|
committer | GitLab Bot <gitlab-bot@gitlab.com> | 2020-04-22 09:09:36 +0000 |
commit | af5fb16f2a9fca958017aade72cf7133e986bc2c (patch) | |
tree | 007dcd6a8ae64239f7f89666a8d3a6f440404778 /spec/javascripts | |
parent | 66b52237fd4f10a62afef61034e90f68cb9363a9 (diff) | |
download | gitlab-ce-af5fb16f2a9fca958017aade72cf7133e986bc2c.tar.gz |
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'spec/javascripts')
-rw-r--r-- | spec/javascripts/line_highlighter_spec.js | 10 |
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() { |