Commit 25fe0b0c authored by Natalia Tepluhina's avatar Natalia Tepluhina

Merge branch '196690-replace-_-with-lodash' into 'master'

[UPDATE] Replace underscore.first with lodash.head

Closes #196690

See merge request gitlab-org/gitlab!25018
parents 45176203 4f2a7a2f
---
title: Replaced underscore with lodash for spec/javascripts/vue_shared/components
merge_request: 25018
author: Shubham Pandey
type: other
import Vue from 'vue';
import _ from 'underscore';
import { head } from 'lodash';
import { GlSearchBoxByType, GlInfiniteScroll } from '@gitlab/ui';
import { mount, createLocalVue } from '@vue/test-utils';
......@@ -99,9 +99,9 @@ describe('ProjectSelector component', () => {
it(`triggers a "projectClicked" event when a project is clicked`, () => {
spyOn(vm, '$emit');
wrapper.find(ProjectListItem).vm.$emit('click', _.first(searchResults));
wrapper.find(ProjectListItem).vm.$emit('click', head(searchResults));
expect(vm.$emit).toHaveBeenCalledWith('projectClicked', _.first(searchResults));
expect(vm.$emit).toHaveBeenCalledWith('projectClicked', head(searchResults));
});
it(`shows a "no results" message if showNoResultsMessage === true`, () => {
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment