Skip to content
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

feat: adds key/value context when toMatchObject or toMatchArray fails #231

Merged
merged 1 commit into from
Nov 28, 2020

Conversation

nunomaduro
Copy link
Member

Q A
Bug fix? no
New feature? yes

This pull request context to the user about what is the key/values that fails while using toMatchObject or toMatchArray.

Screenshot 2020-11-27 at 21 53 56

@nunomaduro nunomaduro changed the title feat(feedback-on-to-match): uses contextual messages inside expectations feat: adds key/value context when toMatchObject or toMatchArray fails Nov 27, 2020
@olivernybroe
Copy link
Member

olivernybroe commented Nov 28, 2020

Could you add a test for it also? :)

Just checking if the property name and value exist in the string output

@nunomaduro
Copy link
Member Author

We already have a couple of tests on this. And to be honest, that would be re-testing base phpunit "Assert" messages. I am not sure.

@nunomaduro nunomaduro merged commit 266d891 into master Nov 28, 2020
@nunomaduro nunomaduro deleted the feat/feedback-on-to-match branch November 28, 2020 17:21
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants