hasown_inherited_nonwritable_configurable_nonenumerable.js 532 B

1234567891011121314151617181920
  1. // Copyright (c) 2021 Jamie Kyle. All rights reserved.
  2. // This code is governed by the BSD license found in the LICENSE file.
  3. /*---
  4. esid: sec-object.hasown
  5. description: >
  6. Properties - [[HasOwnProperty]] (non-writable, configurable,
  7. non-enumerable inherited value property)
  8. author: Jamie Kyle
  9. features: [Object.hasOwn]
  10. ---*/
  11. var base = {};
  12. Object.defineProperty(base, "foo", {
  13. value: 42,
  14. configurable: true
  15. });
  16. var o = Object.create(base);
  17. assert.sameValue(Object.hasOwn(o, "foo"), false, 'Object.hasOwn(o, "foo")');