Debian Codegraph @

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

raw
1 // Copyright 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 info: |
7 Object.hasOwn ( _O_, _P_ )
8
9 1. Let _obj_ be ? ToObject(_O_).
10 2. Let _key_ be ? ToPropertyKey(_P_).
11 3. Return ? HasOwnProperty(_obj_, _key_).
12 description: >
13 Checking type of the Object.hasOwn and the returned result
14 author: Jamie Kyle
15 features: [Object.hasOwn]
16 ---*/
17
18 assert.sameValue(typeof Object.hasOwn, 'function');
19 assert(Object.hasOwn(Object, 'hasOwn'));
20
21 reportCompare(0, 0);