summaryrefslogtreecommitdiffstats
path: root/js/src/tests/non262/Iterator/prototype/find/return-undefined-if-none-match.js
blob: 3e7364fa9539e692c8c77f4446c4dc184e0a23c0 (plain)
1
2
3
4
5
6
7
8
9
10
11
// |reftest| skip-if(!this.hasOwnProperty('Iterator')) -- Iterator is not enabled unconditionally

const iter = [1, 3, 5].values();
const fn = (value) => value % 2 == 0;

assertEq(iter.find(fn), undefined);

assertEq([].values().find(x => x), undefined);

if (typeof reportCompare === 'function')
  reportCompare(0, 0);