Commit d18399e4 authored by Tim Zallmann's avatar Tim Zallmann Committed by Jose Ivan Vargas

Updated axios to 0.24

parent 55e88eaa
...@@ -4,8 +4,6 @@ import { TEST_HOST } from 'helpers/test_constants'; ...@@ -4,8 +4,6 @@ import { TEST_HOST } from 'helpers/test_constants';
import CustomMetricsFormFields from '~/custom_metrics/components/custom_metrics_form_fields.vue'; import CustomMetricsFormFields from '~/custom_metrics/components/custom_metrics_form_fields.vue';
import axios from '~/lib/utils/axios_utils'; import axios from '~/lib/utils/axios_utils';
const { CancelToken } = axios;
describe('custom metrics form fields component', () => { describe('custom metrics form fields component', () => {
let wrapper; let wrapper;
let mockAxios; let mockAxios;
...@@ -116,14 +114,14 @@ describe('custom metrics form fields component', () => { ...@@ -116,14 +114,14 @@ describe('custom metrics form fields component', () => {
it('receives and validates a persisted value', () => { it('receives and validates a persisted value', () => {
const query = 'persistedQuery'; const query = 'persistedQuery';
const axiosPost = jest.spyOn(axios, 'post'); jest.spyOn(axios, 'post');
const source = CancelToken.source();
mountComponent({ metricPersisted: true, ...makeFormData({ query }) }); mountComponent({ metricPersisted: true, ...makeFormData({ query }) });
expect(axiosPost).toHaveBeenCalledWith( expect(axios.post).toHaveBeenCalledWith(
validateQueryPath, validateQueryPath,
{ query }, { query },
{ cancelToken: source.token }, expect.objectContaining({ cancelToken: expect.anything() }),
); );
expect(getNamedInput(queryInputName).value).toBe(query); expect(getNamedInput(queryInputName).value).toBe(query);
jest.runAllTimers(); jest.runAllTimers();
......
...@@ -2529,12 +2529,12 @@ axios-mock-adapter@^1.15.0: ...@@ -2529,12 +2529,12 @@ axios-mock-adapter@^1.15.0:
dependencies: dependencies:
deep-equal "^1.0.1" deep-equal "^1.0.1"
axios@^0.20.0: axios@^0.24.0:
version "0.20.0" version "0.24.0"
resolved "https://registry.yarnpkg.com/axios/-/axios-0.20.0.tgz#057ba30f04884694993a8cd07fa394cff11c50bd" resolved "https://registry.yarnpkg.com/axios/-/axios-0.24.0.tgz#804e6fa1e4b9c5288501dd9dff56a7a0940d20d6"
integrity sha512-ANA4rr2BDcmmAQLOKft2fufrtuvlqR+cXNNinUmvfeSNCOF98PZL+7M/v1zIdGo7OLjEA9J2gXJL+j4zGsl0bA== integrity sha512-Q6cWsys88HoPgAaFAVUb0WpPk0O8iTeisR9IMqy9G8AbO4NlpVknrnQS03zzF9PGAWgO3cgletO3VjV/P7VztA==
dependencies: dependencies:
follow-redirects "^1.10.0" follow-redirects "^1.14.4"
babel-eslint@^10.0.3: babel-eslint@^10.0.3:
version "10.0.3" version "10.0.3"
...@@ -5605,10 +5605,10 @@ flush-write-stream@^1.0.0: ...@@ -5605,10 +5605,10 @@ flush-write-stream@^1.0.0:
inherits "^2.0.3" inherits "^2.0.3"
readable-stream "^2.3.6" readable-stream "^2.3.6"
follow-redirects@^1.0.0, follow-redirects@^1.10.0: follow-redirects@^1.0.0, follow-redirects@^1.14.4:
version "1.13.0" version "1.14.4"
resolved "https://registry.yarnpkg.com/follow-redirects/-/follow-redirects-1.13.0.tgz#b42e8d93a2a7eea5ed88633676d6597bc8e384db" resolved "https://registry.yarnpkg.com/follow-redirects/-/follow-redirects-1.14.4.tgz#838fdf48a8bbdd79e52ee51fb1c94e3ed98b9379"
integrity sha512-aq6gF1BEKje4a9i9+5jimNFIpq4Q1WiwBToeRK5NvZBd/TRsmW8BsJfOEGkr76TbOyPVD3OVDN910EcUNtRYEA== integrity sha512-zwGkiSXC1MUJG/qmeIFH2HBJx9u0V46QGUe3YR1fXG8bXQxq7fLj0RjLZQ5nubr9qNJUZrH+xUcwXEoXNpfS+g==
for-in@^1.0.2: for-in@^1.0.2:
version "1.0.2" version "1.0.2"
......
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