Debian Codegraph @

js/src/tests/test262/built-ins/Object/hasOwn/hasown_inherited_setter_configurable_enumerable.js

raw
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 /*---
5 esid: sec-object.hasown
6 description: >
7 Properties - [[HasOwnProperty]] (configurable, enumerable
8 inherited setter property)
9 author: Jamie Kyle
10 features: [Object.hasOwn]
11 ---*/
12
13 var base = {};
14 Object.defineProperty(base, "foo", {
15 set: function() {;
16 },
17 enumerable: true,
18 configurable: true
19 });
20 var o = Object.create(base);
21
22 assert.sameValue(Object.hasOwn(o, "foo"), false, 'Object.hasOwn(o, "foo")');
23
24 reportCompare(0, 0);