summaryrefslogtreecommitdiffstats
path: root/js/src/tests/non262/AsyncIterator/prototype/reduce/empty-iterator-without-initial-value-throws.js
blob: c54fccba2078d4a0f72a4ec201b90b8459990d2b (plain)
1
2
3
4
5
6
7
8
9
// |reftest| skip-if(!this.hasOwnProperty('AsyncIterator')) 

async function* gen() {}
gen().reduce((x, y) => x + y).then(() => assertEq(true, false, 'expected error'), err => {
  assertEq(err instanceof TypeError, true);
});

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