You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
MSW should intercept Axios requests regardless which adapter you're using. Can you please submit a reproduction repository when it fails to do so? We've got some integration tests with Axios, I'd love to add your use case to them to prevent issues like this. Thanks.
Scope
Improves an existing behavior
Compatibility
Feature description
Axios' latest version changed the underlying adapter configuration.
Using
axios
v1.5.0
withmsw
needs an extra line of code in the test setup.For example:
setup-tests.ts
Have to use
axios.defaults.adapter = 'xhr'
. Otherwise,msw
interception would not work.Source: axios/axios#5844
The text was updated successfully, but these errors were encountered: