diff options
author | Mike Greiling <mike@pixelcog.com> | 2018-10-17 10:13:26 +0300 |
---|---|---|
committer | Mike Greiling <mike@pixelcog.com> | 2018-10-17 19:18:17 +0300 |
commit | f666026d71ebefd70219d5078b1f0c83fa01f84d (patch) | |
tree | ce43feb99c12c21dd266d25de24b1768bac1d459 /spec/javascripts/helpers | |
parent | 5a6fffcffca3dc8e4f52c90d3d18eaefd9e48aef (diff) |
Prettify all spec files
Diffstat (limited to 'spec/javascripts/helpers')
5 files changed, 16 insertions, 15 deletions
diff --git a/spec/javascripts/helpers/class_spec_helper_spec.js b/spec/javascripts/helpers/class_spec_helper_spec.js index fa104ae5bcd..f6268b0fb6d 100644 --- a/spec/javascripts/helpers/class_spec_helper_spec.js +++ b/spec/javascripts/helpers/class_spec_helper_spec.js @@ -2,11 +2,13 @@ import './class_spec_helper'; -describe('ClassSpecHelper', function () { +describe('ClassSpecHelper', function() { describe('itShouldBeAStaticMethod', () => { beforeEach(() => { class TestClass { - instanceMethod() { this.prop = 'val'; } + instanceMethod() { + this.prop = 'val'; + } static staticMethod() {} } diff --git a/spec/javascripts/helpers/locale_helper.js b/spec/javascripts/helpers/locale_helper.js index 99e6ce61234..80047b06003 100644 --- a/spec/javascripts/helpers/locale_helper.js +++ b/spec/javascripts/helpers/locale_helper.js @@ -1,6 +1,6 @@ /* eslint-disable import/prefer-default-export */ -export const setLanguage = (languageCode) => { +export const setLanguage = languageCode => { const htmlElement = document.querySelector('html'); if (languageCode) { diff --git a/spec/javascripts/helpers/set_timeout_promise_helper.js b/spec/javascripts/helpers/set_timeout_promise_helper.js index 1478073413c..47087619187 100644 --- a/spec/javascripts/helpers/set_timeout_promise_helper.js +++ b/spec/javascripts/helpers/set_timeout_promise_helper.js @@ -1,3 +1,4 @@ -export default (time = 0) => new Promise((resolve) => { - setTimeout(resolve, time); -}); +export default (time = 0) => + new Promise(resolve => { + setTimeout(resolve, time); + }); diff --git a/spec/javascripts/helpers/user_mock_data_helper.js b/spec/javascripts/helpers/user_mock_data_helper.js index f6c3ce5aecc..6999fa1f8a1 100644 --- a/spec/javascripts/helpers/user_mock_data_helper.js +++ b/spec/javascripts/helpers/user_mock_data_helper.js @@ -2,14 +2,12 @@ export default { createNumberRandomUsers(numberUsers) { const users = []; for (let i = 0; i < numberUsers; i += 1) { - users.push( - { - avatar: 'https://gravatar.com/avatar/e64c7d89f26bd1972efa854d13d7dd61?s=80&d=identicon', - id: (i + 1), - name: `GitLab User ${i}`, - username: `gitlab${i}`, - }, - ); + users.push({ + avatar: 'https://gravatar.com/avatar/e64c7d89f26bd1972efa854d13d7dd61?s=80&d=identicon', + id: i + 1, + name: `GitLab User ${i}`, + username: `gitlab${i}`, + }); } return users; }, diff --git a/spec/javascripts/helpers/vue_resource_helper.js b/spec/javascripts/helpers/vue_resource_helper.js index 0d1bf5e2e80..0f58af09933 100644 --- a/spec/javascripts/helpers/vue_resource_helper.js +++ b/spec/javascripts/helpers/vue_resource_helper.js @@ -1,6 +1,6 @@ // eslint-disable-next-line import/prefer-default-export export const headersInterceptor = (request, next) => { - next((response) => { + next(response => { const headers = {}; response.headers.forEach((value, key) => { headers[key] = value; |