jest-extended
jest-extended copied to clipboard
Output rejected / resolved value when matcher failed
Feature request:
When using .toResolve
or .toReject
and the promise doesn't settle as we expected we see the error:
Expected promise to resolve but rejected instead
(This error is not the exact error that outputted but it goes something like that)
But when a promise resolved/rejected when it shouldn't it would be helpful to output the promise result so we can now why it rejected/resolved
So maybe the new error message will be something like:
Expected promise to resolve but rejected instead with value:
I can create a PR for this if wanted
I can create a PR for this if wanted That would be a great improvment!