summaryrefslogtreecommitdiffstats
path: root/js/src/tests/non262/Iterator/prototype/every/return-true-if-all-match.js
blob: 894219d29e194cf6402de03896aa8727c24d4a4b (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 == 1;

assertEq(iter.every(fn), true);

assertEq([].values().every(x => x), true);

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