undefined-own-property.js (684B)
1 // Copyright (C) 2015 Leonardo Balter. All rights reserved. 2 // This code is governed by the BSD license found in the LICENSE file. 3 /*--- 4 es6id: 26.1.7 5 description: > 6 Return undefined for an non existing own property. 7 info: | 8 26.1.7 Reflect.getOwnPropertyDescriptor ( target, propertyKey ) 9 10 ... 11 4. Let desc be target.[[GetOwnProperty]](key). 12 5. ReturnIfAbrupt(desc). 13 6. Return FromPropertyDescriptor(desc). 14 15 6.2.4.4 FromPropertyDescriptor ( Desc ) 16 17 1. If Desc is undefined, return undefined. 18 features: [Reflect] 19 ---*/ 20 21 var o = Object.create({ 22 p: 1 23 }); 24 25 var result = Reflect.getOwnPropertyDescriptor(o, 'p'); 26 assert.sameValue(result, undefined); 27 28 reportCompare(0, 0);