summaryrefslogtreecommitdiff
path: root/spec/frontend/frequent_items/components
diff options
context:
space:
mode:
Diffstat (limited to 'spec/frontend/frequent_items/components')
-rw-r--r--spec/frontend/frequent_items/components/app_spec.js14
-rw-r--r--spec/frontend/frequent_items/components/frequent_items_list_item_spec.js2
-rw-r--r--spec/frontend/frequent_items/components/frequent_items_search_input_spec.js4
3 files changed, 10 insertions, 10 deletions
diff --git a/spec/frontend/frequent_items/components/app_spec.js b/spec/frontend/frequent_items/components/app_spec.js
index 439a410eaa1..b74e4ac45cf 100644
--- a/spec/frontend/frequent_items/components/app_spec.js
+++ b/spec/frontend/frequent_items/components/app_spec.js
@@ -65,7 +65,7 @@ describe('Frequent Items App Component', () => {
storage[storageKey] = value;
});
- localStorage.getItem.mockImplementation(storageKey => {
+ localStorage.getItem.mockImplementation((storageKey) => {
if (storage[storageKey]) {
return storage[storageKey];
}
@@ -160,7 +160,7 @@ describe('Frequent Items App Component', () => {
});
describe('created', () => {
- it('should bind event listeners on eventHub', done => {
+ it('should bind event listeners on eventHub', (done) => {
jest.spyOn(eventHub, '$on').mockImplementation(() => {});
createComponentWithStore().$mount();
@@ -173,7 +173,7 @@ describe('Frequent Items App Component', () => {
});
describe('beforeDestroy', () => {
- it('should unbind event listeners on eventHub', done => {
+ it('should unbind event listeners on eventHub', (done) => {
jest.spyOn(eventHub, '$off').mockImplementation(() => {});
vm.$mount();
@@ -191,7 +191,7 @@ describe('Frequent Items App Component', () => {
expect(vm.$el.querySelector('.search-input-container')).toBeDefined();
});
- it('should render loading animation', done => {
+ it('should render loading animation', (done) => {
vm.$store.dispatch('fetchSearchedItems');
Vue.nextTick(() => {
@@ -204,7 +204,7 @@ describe('Frequent Items App Component', () => {
});
});
- it('should render frequent projects list header', done => {
+ it('should render frequent projects list header', (done) => {
Vue.nextTick(() => {
const sectionHeaderEl = vm.$el.querySelector('.section-header');
@@ -214,7 +214,7 @@ describe('Frequent Items App Component', () => {
});
});
- it('should render frequent projects list', done => {
+ it('should render frequent projects list', (done) => {
const expectedResult = getTopFrequentItems(mockFrequentProjects);
localStorage.getItem.mockImplementation(() => JSON.stringify(mockFrequentProjects));
@@ -229,7 +229,7 @@ describe('Frequent Items App Component', () => {
});
});
- it('should render searched projects list', done => {
+ it('should render searched projects list', (done) => {
mock.onGet(/\/api\/v4\/projects.json(.*)$/).replyOnce(200, mockSearchedProjects);
expect(vm.$el.querySelectorAll('.frequent-items-list-container li').length).toBe(1);
diff --git a/spec/frontend/frequent_items/components/frequent_items_list_item_spec.js b/spec/frontend/frequent_items/components/frequent_items_list_item_spec.js
index 1160ed5c84b..19095c4474e 100644
--- a/spec/frontend/frequent_items/components/frequent_items_list_item_spec.js
+++ b/spec/frontend/frequent_items/components/frequent_items_list_item_spec.js
@@ -114,7 +114,7 @@ describe('FrequentItemsListItemComponent', () => {
const link = wrapper.find('a');
// NOTE: this listener is required to prevent the click from going through and causing:
// `Error: Not implemented: navigation ...`
- link.element.addEventListener('click', e => {
+ link.element.addEventListener('click', (e) => {
e.preventDefault();
});
link.trigger('click');
diff --git a/spec/frontend/frequent_items/components/frequent_items_search_input_spec.js b/spec/frontend/frequent_items/components/frequent_items_search_input_spec.js
index f5e654e6bcb..cdd8b127676 100644
--- a/spec/frontend/frequent_items/components/frequent_items_search_input_spec.js
+++ b/spec/frontend/frequent_items/components/frequent_items_search_input_spec.js
@@ -46,7 +46,7 @@ describe('FrequentItemsSearchInputComponent', () => {
});
describe('mounted', () => {
- it('should listen `dropdownOpen` event', done => {
+ it('should listen `dropdownOpen` event', (done) => {
jest.spyOn(eventHub, '$on').mockImplementation(() => {});
const vmX = createComponent().vm;
@@ -61,7 +61,7 @@ describe('FrequentItemsSearchInputComponent', () => {
});
describe('beforeDestroy', () => {
- it('should unbind event listeners on eventHub', done => {
+ it('should unbind event listeners on eventHub', (done) => {
const vmX = createComponent().vm;
jest.spyOn(eventHub, '$off').mockImplementation(() => {});