Debian Codegraph @

js/src/tests/test262/built-ins/Object/fromEntries/string-entry-primitive-throws.js

raw
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 description: Throws when an entry object is a primitive string.
6 esid: sec-object.fromentries
7 features: [Object.fromEntries]
8 ---*/
9
10 assert.sameValue(typeof Object.fromEntries, 'function');
11 assert.throws(TypeError, function() {
12 Object.fromEntries(['ab']);
13 });
14
15 reportCompare(0, 0);