summaryrefslogtreecommitdiff
path: root/spec/javascripts/ajax_loading_spinner_spec.js
diff options
context:
space:
mode:
authorMike Greiling <mike@pixelcog.com>2018-03-09 14:18:59 -0600
committerMike Greiling <mike@pixelcog.com>2018-03-09 15:18:09 -0600
commitf248be7257e82d15fa6441c551e4314bd36343d4 (patch)
tree773b6eefd1ae186432ec1c5fa469d80dbcec4349 /spec/javascripts/ajax_loading_spinner_spec.js
parentc591cf539072f8ef25ed5afc162bc7e87348cc15 (diff)
downloadgitlab-ce-f248be7257e82d15fa6441c551e4314bd36343d4.tar.gz
require jQuery to be explicitly importedremove-jquery-globals
Diffstat (limited to 'spec/javascripts/ajax_loading_spinner_spec.js')
-rw-r--r--spec/javascripts/ajax_loading_spinner_spec.js5
1 files changed, 3 insertions, 2 deletions
diff --git a/spec/javascripts/ajax_loading_spinner_spec.js b/spec/javascripts/ajax_loading_spinner_spec.js
index 95c2c122403..261375d3a0e 100644
--- a/spec/javascripts/ajax_loading_spinner_spec.js
+++ b/spec/javascripts/ajax_loading_spinner_spec.js
@@ -1,3 +1,4 @@
+import $ from 'jquery';
import AjaxLoadingSpinner from '~/ajax_loading_spinner';
describe('Ajax Loading Spinner', () => {
@@ -10,7 +11,7 @@ describe('Ajax Loading Spinner', () => {
});
it('change current icon with spinner icon and disable link while waiting ajax response', (done) => {
- spyOn(jQuery, 'ajax').and.callFake((req) => {
+ spyOn($, 'ajax').and.callFake((req) => {
const xhr = new XMLHttpRequest();
const ajaxLoadingSpinner = document.querySelector('.js-ajax-loading-spinner');
const icon = ajaxLoadingSpinner.querySelector('i');
@@ -33,7 +34,7 @@ describe('Ajax Loading Spinner', () => {
});
it('use original icon again and enabled the link after complete the ajax request', (done) => {
- spyOn(jQuery, 'ajax').and.callFake((req) => {
+ spyOn($, 'ajax').and.callFake((req) => {
const xhr = new XMLHttpRequest();
const ajaxLoadingSpinner = document.querySelector('.js-ajax-loading-spinner');