diff options
Diffstat (limited to 'js/src/tests/test262/built-ins/Symbol/is-constructor.js')
-rw-r--r-- | js/src/tests/test262/built-ins/Symbol/is-constructor.js | 21 |
1 files changed, 21 insertions, 0 deletions
diff --git a/js/src/tests/test262/built-ins/Symbol/is-constructor.js b/js/src/tests/test262/built-ins/Symbol/is-constructor.js new file mode 100644 index 0000000000..b7b730e01b --- /dev/null +++ b/js/src/tests/test262/built-ins/Symbol/is-constructor.js @@ -0,0 +1,21 @@ +// Copyright (C) 2020 Alexey Shvayka. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. +/*--- +esid: sec-symbol-constructor +description: > + Symbol is a constructor and has [[Construct]] internal method. +info: | + The Symbol constructor: + [...] + * may be used as the value of an extends clause of a class definition + but a super call to it will cause an exception. + [...] + * has a [[Prototype]] internal slot whose value is %Function.prototype%. +includes: [isConstructor.js] +features: [Symbol, Reflect.construct] +---*/ + +assert(isConstructor(Symbol)); +assert.sameValue(Object.getPrototypeOf(Symbol), Function.prototype); + +reportCompare(0, 0); |