15.2.3.7-5-a-5.js (676B)
1 // Copyright (c) 2012 Ecma International. All rights reserved. 2 // This code is governed by the BSD license found in the LICENSE file. 3 4 /*--- 5 es5id: 15.2.3.7-5-a-5 6 description: > 7 Object.defineProperties - enumerable own accessor property of 8 'Properties' without a get function is defined in 'O' 9 ---*/ 10 11 var obj = {}; 12 13 var props = {}; 14 Object.defineProperty(props, "prop", { 15 get: function() { 16 return { 17 set: function() {} 18 }; 19 }, 20 enumerable: true 21 }); 22 23 Object.defineProperties(obj, props); 24 25 assert(obj.hasOwnProperty("prop"), 'obj.hasOwnProperty("prop") !== true'); 26 assert.sameValue(typeof obj.prop, "undefined", 'typeof obj.prop'); 27 28 reportCompare(0, 0);