Skip to content

Commit

Permalink
Fix .not.deep.equal.
Browse files Browse the repository at this point in the history
It wasn't passing the negation through.
  • Loading branch information
domenic committed May 27, 2012
1 parent f273ed6 commit db98bd6
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
2 changes: 1 addition & 1 deletion lib/assertion.js
Original file line number Diff line number Diff line change
Expand Up @@ -514,7 +514,7 @@ Object.defineProperty(Assertion.prototype, 'arguments',
Assertion.prototype.equal = function (val) {
var obj = flag(this, 'object');
if (flag(this, 'deep')) {
new Assertion(obj).to.eql(val);
return this.eql(val);
} else {
this.assert(
val === obj
Expand Down
1 change: 1 addition & 0 deletions test/expect.js
Original file line number Diff line number Diff line change
Expand Up @@ -230,6 +230,7 @@ suite('expect', function () {

test('deep.equal(val)', function(){
expect({ foo: 'bar' }).to.deep.equal({ foo: 'bar' });
expect({ foo: 'bar' }).not.to.deep.equal({ foo: 'baz' });
});

test('empty', function(){
Expand Down

0 comments on commit db98bd6

Please sign in to comment.