Home | History | Annotate | Download | only in es6

Lines Matching full:find

28 assertEquals(1, Array.prototype.find.length);
31 assertEquals(undefined, a.find(function() { return false; }));
32 assertEquals(21, a.find(function() { return true; }));
33 assertEquals(undefined, a.find(function(val) { return 121 === val; }));
34 assertEquals(24, a.find(function(val) { return 24 === val; }));
35 assertEquals(23, a.find(function(val) { return 23 === val; }), null);
36 assertEquals(22, a.find(function(val) { return 22 === val; }), undefined);
49 a.find(function(val, key, obj) {
75 var found = a.find(function(val, key, obj) {
98 var found = a.find(function() {
109 // Test Array.prototype.find works with String
117 var found = Array.prototype.find.call(a, function(val, key, obj) {
132 found = Array.prototype.find.apply(a, [function(val, key, obj) {
150 // Test Array.prototype.find works with exotic object
166 var found = Array.prototype.find.call(a, function(val, key, obj) {
188 var found = a.find(function(val) { a.push(val); return false; });
194 found = a.find(function(val, key) { a[key] = ++val; return false; });
211 a.find(function() { count++; return false; });
219 var found = a.find(function(val) { return val === undefined; });
231 var found = a.find(function(val) { return val === 42; });
241 var found = [1, 2, 3].find(function(val, key) {
254 found = ["a", "b", "c"].find(function(val, key) {
262 [1, 2].find(function() { a.push(this) }, "");
267 [1, 2].find(function() { a.push(this) }, {});
272 [1, 2].find(function() { 'use strict'; a.push(this); }, "");
279 assertThrows('Array.prototype.find.call(null, function() { })',
281 assertThrows('Array.prototype.find.call(undefined, function() { })',
283 assertThrows('Array.prototype.find.apply(null, function() { }, [])',
285 assertThrows('Array.prototype.find.apply(undefined, function() { }, [])',
288 assertThrows('[].find(null)', TypeError);
289 assertThrows('[].find(undefined)', TypeError);
290 assertThrows('[].find(0)', TypeError);
291 assertThrows('[].find(true)', TypeError);
292 assertThrows('[].find(false)', TypeError);
293 assertThrows('[].find("")', TypeError);
294 assertThrows('[].find({})', TypeError);
295 assertThrows('[].find([])', TypeError);
296 assertThrows('[].find(/\d+/)', TypeError);
298 assertThrows('Array.prototype.find.call({}, null)', TypeError);
299 assertThrows('Array.prototype.find.call({}, undefined)', TypeError);
300 assertThrows('Array.prototype.find.call({}, 0)', TypeError);
301 assertThrows('Array.prototype.find.call({}, true)', TypeError);
302 assertThrows('Array.prototype.find.call({}, false)', TypeError);
303 assertThrows('Array.prototype.find.call({}, "")', TypeError);
304 assertThrows('Array.prototype.find.call({}, {})', TypeError);
305 assertThrows('Array.prototype.find.call({}, [])', TypeError);
306 assertThrows('Array.prototype.find.call({}, /\d+/)', TypeError);
308 assertThrows('Array.prototype.find.apply({}, null, [])', TypeError);
309 assertThrows('Array.prototype.find.apply({}, undefined, [])', TypeError);
310 assertThrows('Array.prototype.find.apply({}, 0, [])', TypeError);
311 assertThrows('Array.prototype.find.apply({}, true, [])', TypeError);
312 assertThrows('Array.prototype.find.apply({}, false, [])', TypeError);
313 assertThrows('Array.prototype.find.apply({}, "", [])', TypeError);
314 assertThrows('Array.prototype.find.apply({}, {}, [])', TypeError);
315 assertThrows('Array.prototype.find.apply({}, [], [])', TypeError);
316 assertThrows('Array.prototype.find.apply({}, /\d+/, [])', TypeError);