debian-mirror-gitlab/spec/frontend/search_spec.js
2021-02-22 17:27:13 +05:30

23 lines
620 B
JavaScript

import setHighlightClass from 'ee_else_ce/search/highlight_blob_search_result';
import Search from '~/pages/search/show/search';
jest.mock('~/api');
jest.mock('ee_else_ce/search/highlight_blob_search_result');
describe('Search', () => {
const fixturePath = 'search/show.html';
preloadFixtures(fixturePath);
describe('constructor side effects', () => {
afterEach(() => {
jest.restoreAllMocks();
});
it('highlights lines with search terms in blob search results', () => {
new Search(); // eslint-disable-line no-new
expect(setHighlightClass).toHaveBeenCalled();
});
});
});