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:
Diffstat (limited to 'spec/frontend/blob/line_highlighter_spec.js')
-rw-r--r--spec/frontend/blob/line_highlighter_spec.js8
1 files changed, 7 insertions, 1 deletions
diff --git a/spec/frontend/blob/line_highlighter_spec.js b/spec/frontend/blob/line_highlighter_spec.js
index 330f1f3137e..21d4e8db503 100644
--- a/spec/frontend/blob/line_highlighter_spec.js
+++ b/spec/frontend/blob/line_highlighter_spec.js
@@ -1,6 +1,7 @@
/* eslint-disable no-return-assign, no-new, no-underscore-dangle */
import $ from 'jquery';
+import { loadHTMLFixture, resetHTMLFixture } from 'helpers/fixtures';
import LineHighlighter from '~/blob/line_highlighter';
import * as utils from '~/lib/utils/common_utils';
@@ -14,8 +15,9 @@ describe('LineHighlighter', () => {
const e = $.Event('click', eventData);
return $(`#L${number}`).trigger(e);
};
+
beforeEach(() => {
- loadFixtures('static/line_highlighter.html');
+ loadHTMLFixture('static/line_highlighter.html');
testContext.class = new LineHighlighter();
testContext.css = testContext.class.highlightLineClass;
return (testContext.spies = {
@@ -25,6 +27,10 @@ describe('LineHighlighter', () => {
});
});
+ afterEach(() => {
+ resetHTMLFixture();
+ });
+
describe('behavior', () => {
it('highlights one line given in the URL hash', () => {
new LineHighlighter({ hash: '#L13' });