Commit 69b7cd8d authored by Mike Greiling's avatar Mike Greiling

Fix broken axios mock

parent 5480697e
......@@ -3,8 +3,6 @@ import axios from '~/lib/utils/axios_utils';
import { TEST_HOST } from 'helpers/test_constants';
import CustomMetricsFormFields from 'ee/custom_metrics/components/custom_metrics_form_fields.vue';
jest.mock('~/lib/utils/axios_utils');
describe('custom metrics form fields component', () => {
let component;
const getNamedInput = name => component.element.querySelector(`input[name="${name}"]`);
......@@ -40,7 +38,7 @@ describe('custom metrics form fields component', () => {
};
beforeEach(() => {
axios.post.mockRestore();
jest.spyOn(axios, 'post').mockImplementation();
axios.post.mockResolvedValue(validQueryResponse);
});
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment