diff options
Diffstat (limited to 'js/src/tests/non262/AsyncIterator/constructor-subclassable.js')
-rw-r--r-- | js/src/tests/non262/AsyncIterator/constructor-subclassable.js | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/js/src/tests/non262/AsyncIterator/constructor-subclassable.js b/js/src/tests/non262/AsyncIterator/constructor-subclassable.js new file mode 100644 index 0000000000..4e8061cfe7 --- /dev/null +++ b/js/src/tests/non262/AsyncIterator/constructor-subclassable.js @@ -0,0 +1,12 @@ +// |reftest| skip-if(!this.hasOwnProperty('AsyncIterator')) +/*--- + AsyncIterator constructor can be subclassed. +---*/ + +class TestIterator extends AsyncIterator { +} + +assertEq(new TestIterator() instanceof AsyncIterator, true); + +if (typeof reportCompare === 'function') + reportCompare(0, 0); |