-
-
Notifications
You must be signed in to change notification settings - Fork 6.5k
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
expect: Improve report when negative CalledWith assertion fails #8755
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Very nice!
What do you think about dim color for equal arguments in report for negative assertions? In first example, current pull request above possible improvement: P.S. Forgot to say before, scenario above is testing an imaginary reverse-order array method In second and third examples, current pull request at left and possible improvement at right: The reports for positive assertions will need dim color, so we might avoid extra code |
Oh yeah, dimming the parts that match makes a lot of sense to me |
Yes, looks very good 👌 |
This pull request has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs. |
Summary
For
.not.toHaveBeen*CalledWith
assertions:not
followingExpected
labelcalled with no arguments
withcalled with 0 arguments
to avoid double negativeReceived: whatever
on one lineReason to separate pull requests:
Test plan
Updated 40 snapshots
toHaveBeenCalled
toBeCalled
toHaveBeenCalledWith
toBeCalledWith
toHaveBeenLastCalledWith
lastCalledWith
toHaveBeenNthCalledWith
nthCalledWith
See also pictures in following comment
Example pictures baseline at left and improved at right