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

20 lines
422 B
JavaScript

// 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).
...
features: [Object.fromEntries]
---*/
assert.throws(TypeError, function() {
Object.fromEntries();
});