Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMartin Hanzel <mhanzel@gitlab.com>2019-07-17 20:47:39 +0300
committerMike Greiling <mike@pixelcog.com>2019-07-17 20:47:39 +0300
commiteb45cb8c99f4232da90c26b307eff35c926d1975 (patch)
treea1e14c5f34baae8257b4774b6d2b610b8e08284f /spec/frontend/operation_settings
parent48195a517183560cdc673273440c7d757cf40821 (diff)
Mockify jquery and axios packages
Moved the block that fails tests on unmocked axios requests from test_setup to its own mock, and added a jQuery mock that fails tests if they use unmocked $.ajax().
Diffstat (limited to 'spec/frontend/operation_settings')
-rw-r--r--spec/frontend/operation_settings/components/external_dashboard_spec.js5
1 files changed, 4 insertions, 1 deletions
diff --git a/spec/frontend/operation_settings/components/external_dashboard_spec.js b/spec/frontend/operation_settings/components/external_dashboard_spec.js
index a881de8fbfe..39d7c19e731 100644
--- a/spec/frontend/operation_settings/components/external_dashboard_spec.js
+++ b/spec/frontend/operation_settings/components/external_dashboard_spec.js
@@ -7,7 +7,6 @@ import { refreshCurrentPage } from '~/lib/utils/url_utility';
import createFlash from '~/flash';
import { TEST_HOST } from 'helpers/test_constants';
-jest.mock('~/lib/utils/axios_utils');
jest.mock('~/lib/utils/url_utility');
jest.mock('~/flash');
@@ -32,6 +31,10 @@ describe('operation settings external dashboard component', () => {
wrapper = shallow ? shallowMount(...config) : mount(...config);
};
+ beforeEach(() => {
+ jest.spyOn(axios, 'patch').mockImplementation();
+ });
+
afterEach(() => {
if (wrapper.destroy) {
wrapper.destroy();