diff options
Diffstat (limited to '')
-rw-r--r-- | js/src/tests/non262/AsyncIterator/prototype/toArray/iterator-empty.js | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/js/src/tests/non262/AsyncIterator/prototype/toArray/iterator-empty.js b/js/src/tests/non262/AsyncIterator/prototype/toArray/iterator-empty.js new file mode 100644 index 0000000000..d8eec0454d --- /dev/null +++ b/js/src/tests/non262/AsyncIterator/prototype/toArray/iterator-empty.js @@ -0,0 +1,10 @@ +// |reftest| skip-if(!this.hasOwnProperty('AsyncIterator')) + +async function* gen() {} +gen().toArray().then(array => { + assertEq(Array.isArray(array), true); + assertEq(array.length, 0); +}); + +if (typeof reportCompare === 'function') + reportCompare(0, 0); |