Debian Codegraph @

tests/auto/qml/ecmascripttests/test262/test/built-ins/Map/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.1.1.1
5 description: >
6 Throws a TypeError if Map is called without a newTarget.
7 info: |
8 Map ( [ iterable ] )
9
10 When the Map function is called with optional argument the following steps
11 are taken:
12
13 1. If NewTarget is undefined, throw a TypeError exception.
14 ...
15
16 ---*/
17
18 assert.throws(TypeError, function() {
19 Map();
20 });
21
22 assert.throws(TypeError, function() {
23 Map([]);
24 });