is-a-constructor.js 809 B

123456789101112131415161718192021222324
  1. // Copyright (C) 2020 Rick Waldron. All rights reserved.
  2. // This code is governed by the BSD license found in the LICENSE file.
  3. /*---
  4. esid: sec-ecmascript-standard-built-in-objects
  5. description: >
  6. The Set constructor implements [[Construct]]
  7. info: |
  8. IsConstructor ( argument )
  9. The abstract operation IsConstructor takes argument argument (an ECMAScript language value).
  10. It determines if argument is a function object with a [[Construct]] internal method.
  11. It performs the following steps when called:
  12. If Type(argument) is not Object, return false.
  13. If argument has a [[Construct]] internal method, return true.
  14. Return false.
  15. includes: [isConstructor.js]
  16. features: [Reflect.construct, Set]
  17. ---*/
  18. assert.sameValue(isConstructor(Set), true, 'isConstructor(Set) must return true');
  19. new Set();