Automattic / expect.js

Minimalistic BDD-style assertions for Node.JS and the browser.
2.11k stars 209 forks source link

eql(): fix wrong order of actual vs. expected #56

Closed aseemk closed 11 years ago

aseemk commented 11 years ago

The helper expect.eql() function, like typical assertion methods, takes actual then expected:

https://github.com/LearnBoost/expect.js/blob/master/expect.js#L850

But the Assertion.prototype.eql wrapper has been incorrectly passing this.obj (the object being tested) as the expected, and vice versa passing obj (the object used for comparison) as the actual. This fixes that.