Debian Codegraph @

tests/auto/qml/ecmascripttests/test262/test/built-ins/WeakMap/undefined-newtarget.js

raw
1 // Copyright (C) 2015 the V8 project authors. All rights reserved.
2 // This code is governed by the BSD license found in the LICENSE file.
3 /*---
4 es6id: 23.3.1.1
5 esid: sec-weakmap-iterable
6 description: >
7 Throws a TypeError if NewTarget is undefined.
8 info: |
9 23.3.1.1 WeakMap ( [ iterable ] )
10
11 1. If NewTarget is undefined, throw a TypeError exception.
12 ---*/
13
14 assert.throws(TypeError, function() {
15 WeakMap();
16 });
17
18 assert.throws(TypeError, function() {
19 WeakMap([]);
20 });