Update to latest version of expect.js #400
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
In #350, @fb55 and I discovered that the latest version of
expect.js
(0.3.1) caused false positives in Cheerio's unit test suite. Worse, the generated error was causing Mocha to crash, so TravisCI was unaware that the build was failing. (Actually, you might say this was a good thing because the errors were false positives anyway. But I would argue with you :P)This problem was introduced when
expect.js
corrected the parameter order of itseql
comparator. This was a legitimate bug fix--it corrected semantics where (functionally speaking) order has no value.Or it should have no value. Actually, the comparison internal logic has a flaw which makes it non-reflexive. I've submitted a patch against
expect.js
to remedy this and a separate patch to Node.js (sinceexpect.js
's implementation is derived from there)....but that has little significance to the problem in our test suite--an
arguments
object should never be considered equivalent to an Array instance. That's why I'm updating the tests to convert allarguments
into Arrays before comparison.As for Mocha: it was crashing while rendering string diffs for the errors generated by
expect.js
. I've submitted a patch for that, too, but it shouldn't have any bearing on this change.Commit message: