summaryrefslogtreecommitdiffstats
path: root/js/src/tests/test262/built-ins/Object/create/properties-arg-to-object-null.js
blob: 452230e7c883e42c016d0ee9758494b613c5707b (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
// Copyright (C) 2019 Leo Balter. All rights reserved.
// This code is governed by the BSD license found in the LICENSE file.

/*---
esid: sec-object.create
description: >
  Throws a TypeError if the Properties argument is null
info: |
  Object.create ( O, Properties )

  3. If Properties is not undefined, then
    a. Return ? ObjectDefineProperties(obj, Properties).

  Runtime Semantics: ObjectDefineProperties ( O, Properties )

  2. Let props be ? ToObject(Properties).
---*/

assert.throws(TypeError, function() {
  Object.create({}, null);
});

reportCompare(0, 0);