-
-
Notifications
You must be signed in to change notification settings - Fork 6.6k
expect: Improve report when positive CalledWith assertion fails #8771
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
Conversation
jeysal
left a comment
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*CalledWithassertions:ExpectedandReceivedlabelsNumber of callsat 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*CalledWithmatcherstoHave*ReturnedWithmatchersRead the following descriptions with the qualifier if they exist:
toHaveBeenCalledWithcalled with 0 argumentstoHaveBeenLastCalledWithtoHaveBeenNthCalledWithQuestions
toHave*Returnedmatchers 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
toHaveBeenCalledWithtoBeCalledWithtoHaveBeenLastCalledWithlastCalledWithtoHaveBeenNthCalledWithnthCalledWithSee also pictures in following comments
Example pictures baseline at left and improved at right