Releases: knee-cola/jest-mock-axios
Releases · knee-cola/jest-mock-axios
3.1.0
Features
- We switched the library for synchronous promises from
jest-mock-promise
tosynchronous-promise
. This offers us:
(Breaking) Changes
- You can no longer pass the return value of
then
andcatch
tolastPromiseGet
. This was an undocumented feature. Use the promise directly instead. - The error object used for
mockError
is now passed directly tocatch
/reject
instead of being cloned beforehand (#14)
3.0.0
2.4.0
Features
- Throw more descriptive error messages when trying to respond to no request as described in #3 (throwing an error can be disabled totally by passing a new, third argument
silentMode
tomockResponse
andmockError
) - Improve type definitions (#25)
- Add support for setting default common headers (#16)
Docs
- Improved docs (#26)