/* eslint-disable no-return-assign */ import $ from 'jquery'; import syntaxHighlight from '~/syntax_highlight'; describe('Syntax Highlighter', () => { const stubUserColorScheme = value => { if (window.gon == null) { window.gon = {}; } return (window.gon.user_color_scheme = value); }; describe('on a js-syntax-highlight element', () => { beforeEach(() => { setFixtures('
'); }); it('applies syntax highlighting', () => { stubUserColorScheme('monokai'); syntaxHighlight($('.js-syntax-highlight')); expect($('.js-syntax-highlight')).toHaveClass('monokai'); }); }); describe('on a parent element', () => { beforeEach(() => { setFixtures( '