diff --git a/lib/eql.js b/lib/eql.js index 31135e9..ef21923 100644 --- a/lib/eql.js +++ b/lib/eql.js @@ -26,7 +26,7 @@ function _deepEqual(actual, expected) { // 7.3. Other pairs that do not both pass typeof value == "object", // equivalence is determined by ==. } else if (typeof actual != 'object' && typeof expected != 'object') { - return actual == expected; + return actual === expected; // 7.4. For all other Object pairs, including Array objects, equivalence is // determined by having the same number of owned properties (as verified diff --git a/test/should.test.js b/test/should.test.js index bbd3584..21e738b 100644 --- a/test/should.test.js +++ b/test/should.test.js @@ -158,7 +158,7 @@ module.exports = { 'test'.should.eql('test'); ({ foo: 'bar' }).should.eql({ foo: 'bar' }); (1).should.eql(1); - '4'.should.eql(4); + '4'.should.not.eql(4); err(function(){ (4).should.eql(3);