-
-
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 positive CalledWith assertion fails #8771
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.
Beautiful <3
Only looked through the snaps since it's quite a lot of code changes, but I think the output is perfect this way, including regarding your questions. Trailing comma FTW :D
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
Fixes #7884
For positive
toHaveBeen*CalledWith
assertions:Expected
andReceived
labelsNumber of calls
at end of reportDisplay line diff for received call which corresponds to expected call number:
Residue: replace line diff with data-driven diff formatted on one line, when it becomes available
@bandersongit These improvements build on recent pull requests:
toHaveBeen*CalledWith
matcherstoHave*ReturnedWith
matchersRead the following descriptions with the qualifier if they exist:
toHaveBeenCalledWith
called with 0 arguments
toHaveBeenLastCalledWith
toHaveBeenNthCalledWith
Questions
toHave*Returned
matchers when received value is equal to expected?Faithful reviewers, this is last in series of basic improvements to all matchers! Thank you ❤️
Test plan
Updated 34 snapshots
toHaveBeenCalledWith
toBeCalledWith
toHaveBeenLastCalledWith
lastCalledWith
toHaveBeenNthCalledWith
nthCalledWith
See also pictures in following comments
Example pictures baseline at left and improved at right