Compatibility Issue with axios@v1
mpyw opened this issue · 2 comments
mpyw commented
The two critical problems are:
- The value returned from
axios-mock-adapter
mock definitions must be anAxiosHeaders
object, otherwise the instance reference will be changed.axios
does not exposeAxiosHeaders
constructor.While not a bug, axios@v1 still has a problem for testability.
Returning response headers on mock response definition won't work anymore in some cases. The dirty hack will be needed, otherwise we need to make it exposed in axios core.
mpyw commented
marcbachmann commented
I think this got fixed. Please use the newest version.