Debian Codegraph @

js/src/tests/test262/built-ins/Object/hasOwn/toobject_undefined.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 description: >
7 Let O be the result of calling ToObject passing the this value as
8 the argument.
9 author: Jamie Kyle
10 features: [Object.hasOwn]
11 ---*/
12
13 assert.throws(TypeError, function() {
14 Object.hasOwn(undefined, 'foo');
15 });
16
17 reportCompare(0, 0);