All files / app/assets/javascripts/search index.js

100% Statements 9/9
100% Branches 0/0
100% Functions 1/1
100% Lines 9/9

Press n or j to go to the next uncovered block, b, p or k for the previous block.

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23                  1x 7x   7x   7x 7x 7x   7x 7x 7x    
import setHighlightClass from 'ee_else_ce/search/highlight_blob_search_result';
import { queryToObject } from '~/lib/utils/url_utility';
import Project from '~/pages/projects/project';
import refreshCounts from '~/pages/search/show/refresh_counts';
import { initSidebar } from './sidebar';
import { initSearchSort } from './sort';
import createStore from './store';
import { initTopbar } from './topbar';
 
export const initSearchApp = () => {
  const query = queryToObject(window.location.search);
 
  const store = createStore({ query });
 
  initTopbar(store);
  initSidebar(store);
  initSearchSort(store);
 
  setHighlightClass(query.search); // Code Highlighting
  refreshCounts(); // Other Scope Tab Counts
  Project.initRefSwitcher(); // Code Search Branch Picker
};