Ensure cacheIndexOf works correctly with boolean values.

Former-commit-id: 21f65952b14ddfff892a8c151545ad807a8ec9ef
This commit is contained in:
John-David Dalton
2013-08-25 01:39:18 -07:00
parent 2969290c63
commit d47cac563a
6 changed files with 27 additions and 16 deletions

View File

@@ -4004,6 +4004,17 @@
deepEqual(actual, [[2, 1], [1, 2]]);
});
test('should work with large arrays of boolean, `null`, and `undefined` values', function() {
var array = [],
expected = [true, false, null, undefined],
count = Math.ceil(largeArraySize / expected.length);
_.times(count, function() {
push.apply(array, expected);
});
deepEqual(_.uniq(array), expected);
});
test('should distinguish between numbers and numeric strings', function() {
var array = [],
expected = ['2', 2, Object('2'), Object(2)],