summaryrefslogtreecommitdiffstats
path: root/js/src/tests/non262/Iterator/constructor-throw-when-called-directly.js
blob: 2b49b2d4baf416e8ea59243a386b1c8fc50dd104 (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 directly.
---*/

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

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