mirror of https://github.com/tc39/test262.git
28 lines
741 B
JavaScript
28 lines
741 B
JavaScript
// Copyright (C) 2020 Rick Waldron. All rights reserved.
|
|
// This code is governed by the BSD license found in the LICENSE file.
|
|
|
|
/*---
|
|
esid: sec-iterator-constructor
|
|
description: >
|
|
The Iterator constructor is designed to be subclassable.
|
|
info: |
|
|
The Iterator constructor
|
|
|
|
- is designed to be subclassable. It may be used as the value of an extends clause of a class defintion.
|
|
|
|
features: [iterator-helpers]
|
|
---*/
|
|
|
|
class SubIterator extends Iterator {}
|
|
|
|
assert.sameValue(
|
|
new SubIterator() instanceof SubIterator,
|
|
true,
|
|
'The result of `(new SubIterator() instanceof SubIterator)` is true'
|
|
);
|
|
assert.sameValue(
|
|
new SubIterator() instanceof Iterator,
|
|
true,
|
|
'The result of `(new SubIterator() instanceof Iterator)` is true'
|
|
);
|