blob: 9846c33ee5dc563cab4567385709d61e5035d660 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
|
// |reftest| skip-if(!this.hasOwnProperty('AsyncIterator'))
function check(x) {
AsyncIterator.prototype.toArray.call(x).then(
() => {
throw new Error('check should have been rejected');
},
err => {
assertEq(err instanceof TypeError, true);
}
);
}
check();
check(undefined);
check({});
check({next: 0});
if (typeof reportCompare === 'function')
reportCompare(0, 0);
|