Debian Codegraph @

tests/auto/qml/ecmascripttests/test262/test/built-ins/Proxy/getOwnPropertyDescriptor/result-is-undefined.js

raw
1 // Copyright (C) 2015 the V8 project authors. All rights reserved.
2 // This code is governed by the BSD license found in the LICENSE file.
3 /*---
4 es6id: 9.5.5
5 description: >
6 Return undefined if trap result is undefined and target is extensible and
7 the target property descriptor is configurable.
8 info: |
9 [[GetOwnProperty]] (P)
10
11 ...
12 14. If trapResultObj is undefined, then
13 ...
14 f. Return undefined.
15 ...
16 ---*/
17
18 var target = {
19 attr: 1
20 };
21
22 var p = new Proxy(target, {
23 getOwnPropertyDescriptor: function(t, prop) {
24 return;
25 }
26 });
27
28 assert.sameValue(Object.getOwnPropertyDescriptor(p, "attr"), undefined);