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

I am using axios-mock-adapter to test my components. The strange thing is that only a single test can be run successfully because the next one always breaks. Each test works...

Hello Colin, Encountered error: `TypeError: Cannot set property 'handlers' of undefined` Project type: Back-end NodeJS with ES6 modules Dependencies: * `axios` version `^0.27.2` * `axios-mock-adapter` version `^1.21.1` * `jasmine` version...

From https://axios-http.com/docs/cancellation: > Starting from v0.22.0 Axios supports [AbortController](https://developer.mozilla.org/en-US/docs/Web/API/AbortController) to cancel requests in fetch API way. But as far as I can tell, this library only mocks the old cancelToken-based...

Is it possible for `axios-mock-adapter` to work as it is mocking requests right now, but mimick them as real ones that come in and get shown in the Network tab....

I found a way to have expectations fail, but not bubble to fail the test. If I do something like this in my test, the failed expectation will be caught...

I have a Vue project set up with Vue CLI, with axios, axios-mock-adapter, and cypress: ```json { "dependencies": { ... "axios": "^0.23.0", "vue": "^3.0.0", .... }, "devDependencies": { "@vue/cli-plugin-babel": "~4.5.15",...

When using `axios-mock-adapter` in jest I somehow receive this error after the test passed. It seems like that the mock adapter is working and returns the correct result, but somehow...

This PR closes #88 and #129. Currently, it is possible to expect query params for `GET`, or a specific body for `POST`, but it is impossible to expect specific query...

2.0

Love the library but this one detail is preventing me from adopting it. Consider Jest's implemention of `mockImplementationOnce` https://jestjs.io/docs/en/mock-function-api.html#mockfnmockimplementationoncefn ```js const myMockFn = jest .fn() .mockImplementationOnce(cb => cb(null, true)) .mockImplementationOnce(cb...

major-version-candidate