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

highlight_blob_search_result_spec.js « search « frontend « spec - gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
blob: 112e6f5124f47b149a1621dfae069cc6f5ccf70c (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
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);
  });
});