summaryrefslogtreecommitdiff
path: root/spec/javascripts/gl_dropdown_spec.js
diff options
context:
space:
mode:
Diffstat (limited to 'spec/javascripts/gl_dropdown_spec.js')
-rw-r--r--spec/javascripts/gl_dropdown_spec.js22
1 files changed, 10 insertions, 12 deletions
diff --git a/spec/javascripts/gl_dropdown_spec.js b/spec/javascripts/gl_dropdown_spec.js
index 00bc552bd7d..06f76c581f2 100644
--- a/spec/javascripts/gl_dropdown_spec.js
+++ b/spec/javascripts/gl_dropdown_spec.js
@@ -44,19 +44,17 @@ describe('glDropdown', function describeDropdown() {
};
function initDropDown(hasRemote, isFilterable, extraOpts = {}) {
- const options = Object.assign(
- {
- selectable: true,
- filterable: isFilterable,
- data: hasRemote ? remoteMock.bind({}, this.projectsData) : this.projectsData,
- search: {
- fields: ['name'],
- },
- text: project => project.name_with_namespace || project.name,
- id: project => project.id,
+ const options = {
+ selectable: true,
+ filterable: isFilterable,
+ data: hasRemote ? remoteMock.bind({}, this.projectsData) : this.projectsData,
+ search: {
+ fields: ['name'],
},
- extraOpts,
- );
+ text: project => project.name_with_namespace || project.name,
+ id: project => project.id,
+ ...extraOpts,
+ };
this.dropdownButtonElement = $(
'#js-project-dropdown',
this.dropdownContainerElement,