-
-
Notifications
You must be signed in to change notification settings - Fork 225
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add more data to promise matchers #490
base: main
Are you sure you want to change the base?
Add more data to promise matchers #490
Conversation
I'm not sure why did the coverage drop, the message helpers I've added are still tested by the existing tests... can anyone assist please? |
@SimenB any chance you can take a look? 🙏 I'd really appreciate it |
@harelmo I like these changes! could you rebase and fix CI? |
…ise-matchers # Conflicts: # src/matchers/toReject.js # src/matchers/toResolve.js
|
Merged main into this branch and updated the snapshots. It's now failing for coverage reasons. |
What
When using
toReject
/toResolve
, print more detailed failure reason (e.g. whentoResolve
gets a rejected promise, the rejection value will be printed for easier troubleshooting (as discussed in #322 and #218)Why
Often when refactoring code tested using
toResolve
ortoReject
, the test fails but it's unclear on why since the resolved or rejection values are not displayed as a part of the test-failure outout.This PR adds:
toResolve
receives a rejected promise.not.toResolve
receives a resolved promisetoReject
receives a resolved promise.not.toReject
receives a rejected promise.Notes
This does not change the beahvior of
toResolve
ortoReject
in any way, but only adds extra info on falitures.Housekeeping