Ignore isSorted if _.indexOf is customized.

This commit is contained in:
John-David Dalton
2014-07-13 00:26:27 -07:00
parent f7330cce14
commit 12f04650de
2 changed files with 9 additions and 4 deletions

View File

@@ -4527,11 +4527,15 @@
}
});
test('`_.uniq` should work with a custom `_.indexOf` method', 2, function() {
test('`_.uniq` should work with a custom `_.indexOf` method', 6, function() {
if (!isModularize) {
_.indexOf = custom;
deepEqual(_.uniq(array), array.slice(0, 3));
deepEqual(_.uniq(largeArray), [largeArray[0]]);
_.each([false, true, _.identity], function(param) {
deepEqual(_.uniq(array, param), array.slice(0, 3));
deepEqual(_.uniq(largeArray, param), [largeArray[0]]);
});
_.indexOf = indexOf;
}
else {