Lines Matching refs:Array
28 assertEquals(1, Array.prototype.findIndex.length);
40 // Test predicate is not called when array is empty
93 // Test predicate is called array.length times
109 // Test Array.prototype.findIndex works with String
118 var index = Array.prototype.findIndex.call(a, function(val, key, obj) {
133 index = Array.prototype.findIndex.apply(a, [function(val, key, obj) {
151 // Test Array.prototype.findIndex works with exotic object
166 Array.prototype.push.apply(a, [30, 31, 32]);
168 var index = Array.prototype.findIndex.call(a, function(val, key, obj) {
186 // Test array modifications
205 var a = new Array(30);
227 __proto__: Array.prototype,
252 Array.prototype.push.apply(thisArg, ["c", "b", "a"]);
279 assertThrows('Array.prototype.findIndex.call(null, function() { })',
281 assertThrows('Array.prototype.findIndex.call(undefined, function() { })',
283 assertThrows('Array.prototype.findIndex.apply(null, function() { }, [])',
285 assertThrows('Array.prototype.findIndex.apply(undefined, function() { }, [])',
298 assertThrows('Array.prototype.findIndex.call({}, null)', TypeError);
299 assertThrows('Array.prototype.findIndex.call({}, undefined)', TypeError);
300 assertThrows('Array.prototype.findIndex.call({}, 0)', TypeError);
301 assertThrows('Array.prototype.findIndex.call({}, true)', TypeError);
302 assertThrows('Array.prototype.findIndex.call({}, false)', TypeError);
303 assertThrows('Array.prototype.findIndex.call({}, "")', TypeError);
304 assertThrows('Array.prototype.findIndex.call({}, {})', TypeError);
305 assertThrows('Array.prototype.findIndex.call({}, [])', TypeError);
306 assertThrows('Array.prototype.findIndex.call({}, /\d+/)', TypeError);
308 assertThrows('Array.prototype.findIndex.apply({}, null, [])', TypeError);
309 assertThrows('Array.prototype.findIndex.apply({}, undefined, [])', TypeError);
310 assertThrows('Array.prototype.findIndex.apply({}, 0, [])', TypeError);
311 assertThrows('Array.prototype.findIndex.apply({}, true, [])', TypeError);
312 assertThrows('Array.prototype.findIndex.apply({}, false, [])', TypeError);
313 assertThrows('Array.prototype.findIndex.apply({}, "", [])', TypeError);
314 assertThrows('Array.prototype.findIndex.apply({}, {}, [])', TypeError);
315 assertThrows('Array.prototype.findIndex.apply({}, [], [])', TypeError);
316 assertThrows('Array.prototype.findIndex.apply({}, /\d+/, [])', TypeError);