mirror of
https://github.com/tc39/test262.git
synced 2025-04-08 19:35:28 +02:00
Two more simple tests
This commit is contained in:
parent
7f694d4718
commit
60b9467630
11
test/built-ins/Object/fromEntries/empty-iterable.js
Normal file
11
test/built-ins/Object/fromEntries/empty-iterable.js
Normal file
@ -0,0 +1,11 @@
|
||||
// Copyright (C) 2018 Kevin Gibbons. All rights reserved.
|
||||
// This code is governed by the BSD license found in the LICENSE file.
|
||||
|
||||
/*---
|
||||
description: When given an empty list, makes an empty object.
|
||||
esid: sec-object.fromentries
|
||||
features: [Object.fromEntries]
|
||||
---*/
|
||||
|
||||
var result = Object.fromEntries([]);
|
||||
assert.sameValue(Object.keys(result).length, 0);
|
11
test/built-ins/Object/fromEntries/prototype.js
vendored
Normal file
11
test/built-ins/Object/fromEntries/prototype.js
vendored
Normal file
@ -0,0 +1,11 @@
|
||||
// Copyright (C) 2018 Kevin Gibbons. All rights reserved.
|
||||
// This code is governed by the BSD license found in the LICENSE file.
|
||||
|
||||
/*---
|
||||
description: Created objects inherit from Object.prototype.
|
||||
esid: sec-object.fromentries
|
||||
features: [Object.fromEntries]
|
||||
---*/
|
||||
|
||||
var result = Object.fromEntries([]);
|
||||
assert.sameValue(Object.getPrototypeOf(result), Object.prototype);
|
Loading…
x
Reference in New Issue
Block a user