tests/auto/qml/ecmascripttests/test262/test/built-ins/Proxy/create-target-not-object-throw-undefined.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: 9.5.15 |
| 5 | description: > |
| 6 | Proxy ( target, handler ) |
| 7 | ... |
| 8 | 1. If Type(target) is not Object, throw a TypeError exception. |
| 9 | ... |
| 10 | ---*/ |
| 11 | |
| 12 | assert.throws(TypeError, function() { |
| 13 | new Proxy(undefined, {}); |
| 14 | }); |