Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
G
gitlab-ce
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
1
Merge Requests
1
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
nexedi
gitlab-ce
Commits
4f2a7a2f
Commit
4f2a7a2f
authored
Feb 13, 2020
by
Shubham Pandey
Committed by
Natalia Tepluhina
Feb 13, 2020
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
[UPDATE] Replace underscore.first with lodash.head
parent
b9940c46
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
8 additions
and
3 deletions
+8
-3
changelogs/unreleased/196690-replace-_-with-lodash.yml
changelogs/unreleased/196690-replace-_-with-lodash.yml
+5
-0
spec/javascripts/vue_shared/components/project_selector/project_selector_spec.js
...ared/components/project_selector/project_selector_spec.js
+3
-3
No files found.
changelogs/unreleased/196690-replace-_-with-lodash.yml
0 → 100644
View file @
4f2a7a2f
---
title
:
Replaced underscore with lodash for spec/javascripts/vue_shared/components
merge_request
:
25018
author
:
Shubham Pandey
type
:
other
spec/javascripts/vue_shared/components/project_selector/project_selector_spec.js
View file @
4f2a7a2f
import
Vue
from
'
vue
'
;
import
Vue
from
'
vue
'
;
import
_
from
'
underscore
'
;
import
{
head
}
from
'
lodash
'
;
import
{
GlSearchBoxByType
,
GlInfiniteScroll
}
from
'
@gitlab/ui
'
;
import
{
GlSearchBoxByType
,
GlInfiniteScroll
}
from
'
@gitlab/ui
'
;
import
{
mount
,
createLocalVue
}
from
'
@vue/test-utils
'
;
import
{
mount
,
createLocalVue
}
from
'
@vue/test-utils
'
;
...
@@ -99,9 +99,9 @@ describe('ProjectSelector component', () => {
...
@@ -99,9 +99,9 @@ describe('ProjectSelector component', () => {
it
(
`triggers a "projectClicked" event when a project is clicked`
,
()
=>
{
it
(
`triggers a "projectClicked" event when a project is clicked`
,
()
=>
{
spyOn
(
vm
,
'
$emit
'
);
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`
,
()
=>
{
it
(
`shows a "no results" message if showNoResultsMessage === true`
,
()
=>
{
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment