Add unit tests to ensure methods accept falsey arguments and arguments objects.

Former-commit-id: 72dac914c33ad2270deeeffb01c94e5dd00662c6
This commit is contained in:
John-David Dalton
2013-07-13 11:26:44 -07:00
parent 0a7fc356b6
commit 51e2f8e49b
2 changed files with 79 additions and 14 deletions

View File

@@ -157,7 +157,7 @@
*/
function basicIndexOf(array, value, fromIndex) {
var index = (fromIndex || 0) - 1,
length = array.length;
length = array ? array.length : 0;
while (++index < length) {
if (array[index] === value) {