primitive-booleans.js (643B)
1 // Copyright (C) 2015 Jordan Harband. All rights reserved. 2 // This code is governed by the BSD license found in the LICENSE file. 3 4 /*--- 5 esid: sec-object.entries 6 description: Object.entries accepts boolean primitives. 7 author: Jordan Harband 8 ---*/ 9 10 var trueResult = Object.entries(true); 11 12 assert.sameValue(Array.isArray(trueResult), true, 'trueResult is an array'); 13 assert.sameValue(trueResult.length, 0, 'trueResult has 0 items'); 14 15 var falseResult = Object.entries(false); 16 17 assert.sameValue(Array.isArray(falseResult), true, 'falseResult is an array'); 18 assert.sameValue(falseResult.length, 0, 'falseResult has 0 items'); 19 20 reportCompare(0, 0);