blob: d47ba3896064ebd900eced7921d7f46e65cde4f8 (
plain)
1
2
3
4
5
6
7
8
9
|
// |reftest| skip-if(!this.hasOwnProperty('Iterator')) -- Iterator is not enabled unconditionally
const fn = x => x;
assertThrowsInstanceOf(Iterator.prototype.forEach.bind(undefined, fn), TypeError);
assertThrowsInstanceOf(Iterator.prototype.forEach.bind({}, fn), TypeError);
assertThrowsInstanceOf(Iterator.prototype.forEach.bind({next: 0}, fn), TypeError);
if (typeof reportCompare === 'function')
reportCompare(0, 0);
|