test262/test/built-ins/Object/fromEntries/requires-argument.js

20 lines
478 B
JavaScript
Raw Normal View History

2018-08-11 06:49:01 +02:00
// Copyright (C) 2018 Kevin Gibbons. All rights reserved.
// This code is governed by the BSD license found in the LICENSE file.
/*---
esid: sec-object.fromentries
description: Throws when called without an argument.
info: |
Object.fromEntries ( iterable )
1. Perform ? RequireObjectCoercible(iterable).
...
2018-08-11 06:49:01 +02:00
features: [Object.fromEntries]
---*/
assert.sameValue(typeof Object.fromEntries, 'function');
2018-08-11 06:49:01 +02:00
assert.throws(TypeError, function() {
Object.fromEntries();
});