summaryrefslogtreecommitdiff
path: root/spec/javascripts
diff options
context:
space:
mode:
authorgfyoung <gfyoung17@gmail.com>2018-06-13 23:18:05 -0700
committergfyoung <gfyoung17@gmail.com>2018-06-15 13:08:47 -0700
commitdbc74800e22c9ea417d30fd4c357d6154cc71870 (patch)
treef704225b4ce0d922047b5eb83a258ca2e69e3a7a /spec/javascripts
parent102db0aaf162ec122d79e1aaff0f5ac3c86af373 (diff)
downloadgitlab-ce-dbc74800e22c9ea417d30fd4c357d6154cc71870.tar.gz
Enable no-multi-assignment in JS files
Partially addresses #47006.
Diffstat (limited to 'spec/javascripts')
-rw-r--r--spec/javascripts/gl_field_errors_spec.js4
-rw-r--r--spec/javascripts/helpers/user_mock_data_helper.js2
-rw-r--r--spec/javascripts/profile/account/components/update_username_spec.js3
-rw-r--r--spec/javascripts/test_bundle.js3
4 files changed, 8 insertions, 4 deletions
diff --git a/spec/javascripts/gl_field_errors_spec.js b/spec/javascripts/gl_field_errors_spec.js
index 4e93fd91751..108e0064c47 100644
--- a/spec/javascripts/gl_field_errors_spec.js
+++ b/spec/javascripts/gl_field_errors_spec.js
@@ -8,7 +8,9 @@ describe('GL Style Field Errors', function() {
beforeEach(function() {
loadFixtures('static/gl_field_errors.html.raw');
- const $form = this.$form = $('form.gl-show-field-errors');
+ const $form = $('form.gl-show-field-errors');
+
+ this.$form = $form;
this.fieldErrors = new GlFieldErrors($form);
});
diff --git a/spec/javascripts/helpers/user_mock_data_helper.js b/spec/javascripts/helpers/user_mock_data_helper.js
index 323fee3767e..f6c3ce5aecc 100644
--- a/spec/javascripts/helpers/user_mock_data_helper.js
+++ b/spec/javascripts/helpers/user_mock_data_helper.js
@@ -1,7 +1,7 @@
export default {
createNumberRandomUsers(numberUsers) {
const users = [];
- for (let i = 0; i < numberUsers; i = i += 1) {
+ for (let i = 0; i < numberUsers; i += 1) {
users.push(
{
avatar: 'https://gravatar.com/avatar/e64c7d89f26bd1972efa854d13d7dd61?s=80&d=identicon',
diff --git a/spec/javascripts/profile/account/components/update_username_spec.js b/spec/javascripts/profile/account/components/update_username_spec.js
index bac306edf5a..5311499fb73 100644
--- a/spec/javascripts/profile/account/components/update_username_spec.js
+++ b/spec/javascripts/profile/account/components/update_username_spec.js
@@ -90,7 +90,8 @@ describe('UpdateUsername component', () => {
it('confirmation modal should escape usernames properly', done => {
const { modalBody } = findElements();
- vm.username = vm.newUsername = '<i>Italic</i>';
+ vm.username = '<i>Italic</i>';
+ vm.newUsername = vm.username;
Vue.nextTick()
.then(() => {
diff --git a/spec/javascripts/test_bundle.js b/spec/javascripts/test_bundle.js
index 2411d33a496..994011b262a 100644
--- a/spec/javascripts/test_bundle.js
+++ b/spec/javascripts/test_bundle.js
@@ -39,7 +39,8 @@ jasmine.getJSONFixtures().fixturesPath = FIXTURES_PATH;
beforeAll(() => jasmine.addMatchers(customMatchers));
// globalize common libraries
-window.$ = window.jQuery = $;
+window.$ = $;
+window.jQuery = window.$;
// stub expected globals
window.gl = window.gl || {};