diff options
Diffstat (limited to 'spec/frontend/mocks')
-rw-r--r-- | spec/frontend/mocks/node/jquery.js | 15 |
1 files changed, 0 insertions, 15 deletions
diff --git a/spec/frontend/mocks/node/jquery.js b/spec/frontend/mocks/node/jquery.js deleted file mode 100644 index 5c82f65406e..00000000000 --- a/spec/frontend/mocks/node/jquery.js +++ /dev/null @@ -1,15 +0,0 @@ -/* eslint-disable import/no-commonjs */ - -const $ = jest.requireActual('jquery'); - -// Fail tests for unmocked requests -$.ajax = () => { - const err = new Error( - 'Unexpected unmocked jQuery.ajax() call! Make sure to mock jQuery.ajax() in tests.', - ); - global.fail(err); - throw err; -}; - -// jquery is not an ES6 module -module.exports = $; |