Debian Codegraph @

tests/auto/qml/ecmascripttests/test262/test/built-ins/Object/create/15.2.3.5-4-308.js

raw
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.5-4-308
6 description: >
7 Object.create - [[Enumerable]] is set as false if it is absent in
8 data descriptor of one property in 'Properties' (8.12.9 step 4.a.i)
9 ---*/
10
11 var isEnumerable = false;
12
13 var newObj = Object.create({}, {
14 prop: {
15 value: 1001,
16 writable: true,
17 configurable: true
18 }
19 });
20
21 var hasProperty = newObj.hasOwnProperty("prop");
22
23 for (var p in newObj) {
24 if (p === "prop") {
25 isEnumerable = true;
26 }
27 }
28
29 assert(hasProperty, 'hasProperty !== true');
30 assert.sameValue(isEnumerable, false, 'isEnumerable');