Commit 55969fe8 authored by Lee Tickett's avatar Lee Tickett Committed by Martin Wortschack

Remove var from syntax_highlight_spec.js

parent 2294e860
---
title: Remove var from syntax_highlight_spec.js
merge_request: 20086
author: Lee Tickett
type: other
/* eslint-disable no-var, no-return-assign */ /* eslint-disable no-return-assign */
import $ from 'jquery'; import $ from 'jquery';
import syntaxHighlight from '~/syntax_highlight'; import syntaxHighlight from '~/syntax_highlight';
describe('Syntax Highlighter', function() { describe('Syntax Highlighter', function() {
var stubUserColorScheme; const stubUserColorScheme = function(value) {
stubUserColorScheme = function(value) {
if (window.gon == null) { if (window.gon == null) {
window.gon = {}; window.gon = {};
} }
...@@ -40,9 +39,8 @@ describe('Syntax Highlighter', function() { ...@@ -40,9 +39,8 @@ describe('Syntax Highlighter', function() {
}); });
it('prevents an infinite loop when no matches exist', function() { it('prevents an infinite loop when no matches exist', function() {
var highlight;
setFixtures('<div></div>'); setFixtures('<div></div>');
highlight = function() { const highlight = function() {
return syntaxHighlight($('div')); return syntaxHighlight($('div'));
}; };
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment