axios-mock-adapter icon indicating copy to clipboard operation
axios-mock-adapter copied to clipboard

Axios adapter that allows to easily mock requests

Results 117 axios-mock-adapter issues
Sort by recently updated
recently updated
newest added

In Axios, it is possible to use this configuration to get explicit timeout errors: ``` transitional: { clarifyTimeoutError: true, }, ``` When doing that, I get the error code `ETIMEDOUT`...

i am using axios-mock-adapter to mock tests in react app. got below error while running single test but it is passing in case of all tests. /home/dev/code/client/node_modules/react-scripts/scripts/test.js:22 throw err; ^...

**Versions:** - NodeJS: 16.13.0 - axios: 0.26.1 - axios-mock-adapter: 1.20.0 - Typescript: 4.6.3 - system: WSL Ubuntu 18.04 ------------- As in title, here is a [repro](https://github.com/syffs/jest-mongodb-demo) with [axios test](https://github.com/syffs/jest-mongodb-demo/blob/3ecd2f484f4e54ce18650a481429593e2fc632b3/tests/api/sample-api.test.ts#L38). Just...

I am a little bit confused about the workflow of how everything communicates with each other. As far as i understand axios converts post data automatically into json-string. so i...

context below, my version of the mock did not line up with the axios version we're using, could you include the supported version near the top of your documentation please...

Hi! Thanks for this great library, mocking is now easier for me. I was wondering if you would be interested in creating a documentation website for this library? Axios has...

tried: ```js mock.onGet( apiPath('/Facility') ).reply(config=>{ console.log(config); return [ 200,newItem(1) ] }) ``` ```js mock.onGet( apiPath('/Facility'),{ params: { facilityId: /\d+/ } } ).reply(config=>{ console.log(config); return [ 200,newItem(1) ] }) ``` apiPath...

Callback looks like this: ``` type CallbackResponseSpecFunc = ( config: AxiosRequestConfig ) => unknown[] | Promise; ``` It tells nothing about what needs to be inside the array. Only by...

I have an axios request that looks like: ``` const res = await axios({ method: 'get', url: `/reports/${report.id}`, responseType: 'arraybuffer', }) const blob = new Blob([res.data], { type: 'text/csv' })...

(for my work I still have to support IE11) the culprit is [is-blob](https://github.com/ctimmerm/axios-mock-adapter/blob/master/src/utils.js#L6) the imported script is not es5 compiled (just because it use an arrow function...) ```js module.exports =...