mirror of
https://github.com/chaijs/chai
synced 2024-11-15 00:07:11 +00:00
Make error message for eql/deep.equal more clear.
This commit is contained in:
parent
db98bd69e6
commit
8cd580d7f2
4 changed files with 6 additions and 6 deletions
|
@ -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;
|
||||
|
|
|
@ -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() {
|
||||
|
|
|
@ -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(){
|
||||
|
|
|
@ -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(){
|
||||
|
|
Loading…
Reference in a new issue