properties-arg-to-object-null.js (574B)
1 // Copyright (C) 2019 Leo Balter. All rights reserved. 2 // This code is governed by the BSD license found in the LICENSE file. 3 4 /*--- 5 esid: sec-object.create 6 description: > 7 Throws a TypeError if the Properties argument is null 8 info: | 9 Object.create ( O, Properties ) 10 11 3. If Properties is not undefined, then 12 a. Return ? ObjectDefineProperties(obj, Properties). 13 14 Runtime Semantics: ObjectDefineProperties ( O, Properties ) 15 16 2. Let props be ? ToObject(Properties). 17 ---*/ 18 19 assert.throws(TypeError, function() { 20 Object.create({}, null); 21 }); 22 23 reportCompare(0, 0);