summaryrefslogtreecommitdiffstats
path: root/js/src/tests/non262/Iterator/prototype/reduce/empty-iterator-without-initial-value-throws.js
blob: d8e0a595cfc6d89c3f1ec3fd2a574bf803dea1c2 (plain)
1
2
3
4
5
6
7
// |reftest| skip-if(!this.hasOwnProperty('Iterator')) -- Iterator is not enabled unconditionally

const iter = [].values();
assertThrowsInstanceOf(() => iter.reduce((x, y) => x + y), TypeError);

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