15.2.3.6-4-424.js (888B)
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.6-4-424 6 description: > 7 ES5 Attributes - property ([[Get]] is undefined, [[Set]] is 8 undefined, [[Enumerable]] is true, [[Configurable]] is true) is 9 enumerable 10 ---*/ 11 12 var propertyFound = false; 13 14 var obj = {}; 15 16 Object.defineProperty(obj, "prop", { 17 get: undefined, 18 set: undefined, 19 enumerable: true, 20 configurable: true 21 }); 22 23 var propertyDefineCorrect = obj.hasOwnProperty("prop"); 24 var desc = Object.getOwnPropertyDescriptor(obj, "prop"); 25 26 for (var p in obj) { 27 if (p === "prop") { 28 propertyFound = true; 29 break; 30 } 31 } 32 33 assert(propertyFound, 'Property not found'); 34 assert(propertyDefineCorrect, 'propertyDefineCorrect !== true'); 35 assert.sameValue(desc.enumerable, true, 'desc.enumerable'); 36 37 reportCompare(0, 0);