Make error message for eql/deep.equal more clear.

This commit is contained in:
domenic 2012-05-27 17:31:42 -04:00
parent db98bd69e6
commit 8cd580d7f2
4 changed files with 6 additions and 6 deletions

View file

@ -542,8 +542,8 @@ Assertion.prototype.equal = function (val) {
Assertion.prototype.eql = function (obj) {
this.assert(
util.eql(obj, flag(this, 'object'))
, 'expected #{this} to equal #{exp}'
, 'expected #{this} to not equal #{exp}'
, 'expected #{this} to deeply equal #{exp}'
, 'expected #{this} to not deeply equal #{exp}'
, obj );
return this;

View file

@ -180,7 +180,7 @@ suite('assert', function () {
err(function () {
assert.deepEqual({tea: 'chai'}, {tea: 'black'});
}, "expected { tea: \'chai\' } to equal { tea: \'black\' }");
}, "expected { tea: \'chai\' } to deeply equal { tea: \'black\' }");
});
test('notDeepEqual', function() {
@ -188,7 +188,7 @@ suite('assert', function () {
err(function () {
assert.notDeepEqual({tea: 'chai'}, {tea: 'chai'});
}, "expected { tea: \'chai\' } to not equal { tea: \'chai\' }");
}, "expected { tea: \'chai\' } to not deeply equal { tea: \'chai\' }");
});
test('isNull', function() {

View file

@ -212,7 +212,7 @@ suite('expect', function () {
err(function(){
expect(4).to.eql(3);
}, 'expected 4 to equal 3');
}, 'expected 4 to deeply equal 3');
});
test('equal(val)', function(){

View file

@ -217,7 +217,7 @@ suite('should', function() {
err(function(){
(4).should.eql(3);
}, 'expected 4 to equal 3');
}, 'expected 4 to deeply equal 3');
});
test('equal(val)', function(){