-
-
Notifications
You must be signed in to change notification settings - Fork 22
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
Improve assertion messages when running expectations #281
Conversation
Tests for node.js 12, 14 and 16 fail just because the formatting of stack traces lines are slightly different than in the newer node.js versions (>= 18). |
Wow, this is an amazing addition! I am currently sick and have been for a week, but hope to contribute at a faster pace soon ❤️ |
Yeah let's just drop support for those older versions of node BTW. 18 and up should be fine. |
Thanks 😄 |
I love that strategy! Let's do that ❤️ Thank you! |
I made some changes to allow a bunch of serialization options:
It just generates a string with a simple tree of the substitution object (not exposing any internals) |
Showcases a draft on how to improve the readability and developer experience when evaluating assertions (received didNotReceive).
Originated from the suggestion in #140, with this addition, we'd be recording stack traces of where a call was made. I also tried to enrich the assertion failure description with information like what has been called, how and what's expected:
Closes #140
Closes #27
Closes #138