Cleanup deep _.clone and _.where unit tests.

Former-commit-id: b7106461640259ca3bf60c1fabb91b59b241e35f
This commit is contained in:
John-David Dalton
2013-01-27 02:39:18 -08:00
parent 3cf4607870
commit cf13eca58c

View File

@@ -343,7 +343,7 @@
ok(_.isEqual(object, clone)); ok(_.isEqual(object, clone));
if (_.isObject(object)) { if (_.isObject(object)) {
notStrictEqual(clone, object); notEqual(clone, object);
} else { } else {
skipTest(); skipTest();
} }
@@ -2365,12 +2365,10 @@
}); });
test('should deep compare `properties` values', function() { test('should deep compare `properties` values', function() {
var collection = [ var collection = [{ 'a': { 'b': 1, 'c': 2 } }],
{ 'a': { 'b': 1, 'c': 2 } }, expected = _.cloneDeep(collection);
{ 'a': { 'b': 2, 'c': 3 } }
];
deepEqual(_.where(collection, { 'a': { 'b': 1 } }), [{ 'a': { 'b': 1, 'c': 2 } }]); deepEqual(_.where(collection, { 'a': { 'b': 1 } }), expected);
}); });
}()); }());