summaryrefslogtreecommitdiffstats
path: root/js/src/tests/non262/Iterator/constructor-throw-without-new.js
blob: 85497fcd6305addf9c1a8b4932bbb9b34631d76d (plain)
1
2
3
4
5
6
7
8
9
// |reftest| skip-if(!this.hasOwnProperty('Iterator')) -- Iterator is not enabled unconditionally
/*---
  Iterator constructor throws when called without new.
---*/

assertThrowsInstanceOf(() => Iterator(), TypeError);

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