mirror of
https://github.com/whoisclebs/lodash.git
synced 2026-02-05 17:37:50 +00:00
Ensure cacheIndexOf works correctly with boolean values.
Former-commit-id: 21f65952b14ddfff892a8c151545ad807a8ec9ef
This commit is contained in:
11
test/test.js
11
test/test.js
@@ -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)],
|
||||
|
||||
Reference in New Issue
Block a user