Ensure _.indexOf and _.lastIndexOf match NaN when performing a binary search.

This commit is contained in:
John-David Dalton
2014-09-25 09:42:27 -07:00
parent a6a93148b4
commit dc9b320c4a
2 changed files with 8 additions and 4 deletions

View File

@@ -7066,8 +7066,9 @@
strictEqual(func(empty, undefined, true), -1);
});
test('`_.' + methodName + '` should match `NaN`', 1, function() {
test('`_.' + methodName + '` should match `NaN`', 2, function() {
strictEqual(func([1, NaN, 3], NaN), 1);
strictEqual(func([1, 3, NaN], NaN, true), 2);
});
});