Debian Codegraph @

tests/auto/qml/ecmascripttests/test262/test/built-ins/Proxy/revocable/revocation-function-nonconstructor.js

raw
1 // Copyright (C) 2015 André Bargull. All rights reserved.
2 // This code is governed by the BSD license found in the LICENSE file.
3
4 /*---
5 es6id: 26.2.2.1.1
6 description: Proxy Revocation functions are not constructors
7 info: |
8 17 ECMAScript Standard Built-in Objects:
9 Built-in function objects that are not identified as constructors do not
10 implement the [[Construct]] internal method unless otherwise specified
11 in the description of a particular function.
12 ---*/
13
14 var revocationFunction = Proxy.revocable({}, {}).revoke;
15
16 assert.sameValue(Object.prototype.hasOwnProperty.call(revocationFunction, "prototype"), false);
17 assert.throws(TypeError, function() {
18 new revocationFunction();
19 });