You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
PASS toObject([undefined, 0, null, false]).findIndex(passEmptyString) is -1
32
36
PASS toObject([undefined, null, false, '']).findIndex(passZero) is -1
33
37
PASS toObject(new Array(20)).findIndex(passUndefined) is -1
38
+
Array-like object with invalid lengths
39
+
PASS var obj = { 0: 1, 1: 2, 2: 3, length: 0 }; Array.prototype.findIndex.call(obj, throwError) is -1
40
+
PASS var obj = { 0: 1, 1: 2, 2: 3, length: -0 }; Array.prototype.findIndex.call(obj, throwError) is -1
41
+
PASS var obj = { 0: 1, 1: 2, 2: 3, length: -3 }; Array.prototype.findIndex.call(obj, throwError) is -1
42
+
Modification during search
34
43
PASS [0,1,2,3,4,5,6,7,8,9].findIndex(findItemAddedDuringSearch) is -1
35
44
PASS [0,1,2,3,4,5,6,7,8,9].findIndex(findItemRemovedDuringSearch) is -1
45
+
Exceptions
36
46
PASS Array.prototype.findIndex.call(undefined, function() {}) threw exception TypeError: Array.prototype.findIndex requires that |this| not be undefined.
37
47
PASS Array.prototype.findIndex.call(null, function() {}) threw exception TypeError: Array.prototype.findIndex requires that |this| not be null.
38
48
PASS [].findIndex(1) threw exception TypeError: Array.prototype.findIndex callback must be a function.
0 commit comments