tests/auto/qml/ecmascripttests/test262/test/built-ins/Proxy/proxy-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: 26.2.1.1 |
| 5 | description: > |
| 6 | Proxy ( target, handler ) |
| 7 | |
| 8 | When Proxy is called with arguments target and handler performs |
| 9 | the following steps: |
| 10 | |
| 11 | 1. If NewTarget is undefined, throw a TypeError exception. |
| 12 | ... |
| 13 | |
| 14 | ---*/ |
| 15 | |
| 16 | assert.throws(TypeError, function() { |
| 17 | Proxy({}, {}); |
| 18 | }); |