Re-add overwritten _.isEqual unit test.

Former-commit-id: 52d4e3bc02a6fd0ac30177c9da82dec60ee6eb81
This commit is contained in:
John-David Dalton
2012-09-10 23:41:20 -07:00
parent 5f085ccb52
commit cad8473986

View File

@@ -770,10 +770,15 @@
equal(_.isEqual(shadowed, {}), false);
});
test('should use custom `isEqual` methods on primitives', function() {
Boolean.prototype.isEqual = function() { return true; };
equal(_.isEqual(true, false), true);
delete Boolean.prototype.isEqual;
test('should return `true` for like-objects from different documents', function() {
// ensure `_._object` is assigned (unassigned in Opera 10.00)
if (_._object) {
var object = { 'a': 1, 'b': 2, 'c': 3 };
equal(_.isEqual(object, _._object), true);
}
else {
skipTest();
}
});
test('should return `false` when comparing values with circular references to unlike values', function() {