15.2.3.14-5-1.js (545B)
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.14-5-1 6 description: > 7 Object.keys - own enumerable data property of 'O' is defined in 8 returned array 9 ---*/ 10 11 var obj = {}; 12 13 Object.defineProperty(obj, "prop", { 14 value: 1003, 15 enumerable: true, 16 configurable: true 17 }); 18 19 var arr = Object.keys(obj); 20 21 assert(arr.hasOwnProperty(0), 'arr.hasOwnProperty(0) !== true'); 22 assert.sameValue(arr[0], "prop", 'arr[0]'); 23 24 reportCompare(0, 0);