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

Enabling showDiff for assert's equal and notEqual methods. Closes #790 #794

Merged

Conversation

lucasfcosta
Copy link
Member

This aims to close #790.

As explained on this post the equal and notEqual methods on the assert interface, which called Assertion.assert directly, didn't have the showDiff flag turned on and that would make their error messages look different because of the way the test runner showed results.

In order to make that behavior consistent with the equal related methods on other interfaces, I enabled the showDiff flag for these assertions too.

I didn't add any tests since this was a problem related to the test runner and not ours.
Please read the post I linked above for more details.
Thanks everyone 😄

@meeber
Copy link
Contributor

meeber commented Sep 10, 2016

LGTM!

@lucasfcosta
Copy link
Member Author

Well, actually I was taking a look at #574 and I noticed this would not necessarily be needed, since the new default behavior of showDiff on 4.x.x will be to be turned on if it is not explicitly defined as false.

However, I'd like to keep this explicit just to make sure the behavior will still be consistent with the other equal methods, since they explicitly set showDiff to true.

Let me know if you prefer thrusting on the default behavior instead of adding an explicit true value for the showDiff flag.

@meeber
Copy link
Contributor

meeber commented Sep 10, 2016

I prefer to keep it explicit for reasons of consistency.

@keithamus
Copy link
Member

Yeah, let's keep it explicit. LGTM

@keithamus keithamus merged commit 95b511a into chaijs:master Sep 11, 2016
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.

Inconsistent between API guide and message from assert.equal
3 participants