ctimmerm / axios-mock-adapter

Axios adapter that allows to easily mock requests
MIT License
3.47k stars 245 forks source link

axios instance is not mocked #335

Closed syffs closed 3 months ago

syffs commented 2 years ago

Versions:

is there a way to somehow mock axios globally (for every instance) ?

marcbachmann commented 3 months ago

There's currently no way to mock all axios instances as it doesn't inherit the interceptors. You'd need to track the instances yourself and call the mock on all of them 🤔 There are no plans to add such support.