empty-iterable.js (637B)
1 // Copyright (C) 2018 Kevin Gibbons. All rights reserved. 2 // This code is governed by the BSD license found in the LICENSE file. 3 4 /*--- 5 esid: sec-object.fromentries 6 description: When given an empty list, makes an empty object. 7 info: | 8 Object.fromEntries ( iterable ) 9 10 ... 11 4. Let stepsDefine be the algorithm steps defined in CreateDataPropertyOnObject Functions. 12 5. Let adder be CreateBuiltinFunction(stepsDefine, « »). 13 6. Return ? AddEntriesFromIterable(obj, iterable, adder). 14 15 features: [Object.fromEntries] 16 ---*/ 17 18 var result = Object.fromEntries([]); 19 assert.sameValue(Object.keys(result).length, 0); 20 21 reportCompare(0, 0);