Make whereIndicator check strict and make the _.where deep object comparison unit test deeper.

Former-commit-id: b9c59ff56b3ab7acd519888407de5dd02d6475cf
This commit is contained in:
John-David Dalton
2013-02-09 10:08:43 -08:00
parent 9dfa2609be
commit 77804907b6
6 changed files with 7 additions and 7 deletions

View File

@@ -2494,10 +2494,10 @@
});
test('should deep compare `properties` values', function() {
var collection = [{ 'a': { 'b': 1, 'c': 2 } }],
var collection = [{ 'a': { 'b': { 'c': 1, 'd': 2 }, 'e': 3 }, 'f': 4 }],
expected = _.cloneDeep(collection);
deepEqual(_.where(collection, { 'a': { 'b': 1 } }), expected);
deepEqual(_.where(collection, { 'a': { 'b': { 'c': 1 } } }), expected);
});
}());