Welcome to mirror list, hosted at ThFree Co, Russian Federation.

highlight_blob_search_result_spec.js « show « search « pages « frontend « spec - gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
blob: 4083a65df75dc10d0ae983a6b7e7ac63479bb52a (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
import setHighlightClass from '~/pages/search/show/highlight_blob_search_result';

const fixture = 'search/blob_search_result.html';

describe('pages/search/show/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(11);
  });
});