OLD | NEW |
| (Empty) |
1 Test to ensure correct behaviour of Object.defineProperties | |
2 | |
3 On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE
". | |
4 | |
5 | |
6 PASS Object.defineProperties() threw exception TypeError: Properties can only be
defined on Objects.. | |
7 PASS Object.defineProperties('a string') threw exception TypeError: Properties c
an only be defined on Objects.. | |
8 PASS Object.defineProperties({}, 'a string') threw exception TypeError: Property
description must be an object.. | |
9 PASS JSON.stringify(Object.defineProperties({},{property:{value:'foo', enumerabl
e:true}, property2:{value:'foo', enumerable:true}})) is '{"property":"foo","prop
erty2":"foo"}' | |
10 PASS JSON.stringify(Object.defineProperties({},{property:{value:'foo'}, property
2:{value:'foo', enumerable:true}})) is '{"property2":"foo"}' | |
11 PASS JSON.stringify(Object.defineProperties({property:'foo'},{property:{value:'f
oo', enumerable:true}, property2:{value:'foo', enumerable:true}})) is '{"propert
y":"foo","property2":"foo"}' | |
12 PASS JSON.stringify(Object.defineProperties({property:'foo'},{property:{value:'f
oo', enumerable:false}, property2:{value:'foo', enumerable:true}})) is '{"proper
ty2":"foo"}' | |
13 PASS JSON.stringify(Object.defineProperties({property:'foo'},{property:{value:'f
oo'}, property2:{value:'foo', enumerable:true}})) is '{"property":"foo","propert
y2":"foo"}' | |
14 PASS Object.defineProperties(emptyObject, {foo:{value: true}, bar:{get:function(
){}, writable:true}}) threw exception TypeError: Invalid property. 'writable' p
resent on property with getter or setter.. | |
15 PASS 'foo' in emptyObject is false | |
16 PASS successfullyParsed is true | |
17 | |
18 TEST COMPLETE | |
19 | |
OLD | NEW |