debian-mirror-gitlab/spec/frontend/search/highlight_blob_search_result_spec.js
2021-01-30 21:13:34 +05:30

15 lines
424 B
JavaScript

import setHighlightClass from '~/search/highlight_blob_search_result';
const fixture = 'search/blob_search_result.html';
describe('search/highlight_blob_search_result', () => {
preloadFixtures(fixture);
beforeEach(() => loadFixtures(fixture));
it('highlights lines with search term occurrence', () => {
setHighlightClass();
expect(document.querySelectorAll('.blob-result .hll').length).toBe(4);
});
});