builtin.js (1047B)
1 // Copyright (C) 2020 Alexey Shvayka. All rights reserved. 2 // This code is governed by the BSD license found in the LICENSE file. 3 /*--- 4 esid: sec-proxy.revocable 5 description: > 6 Requirements for built-in functions, defined in introduction of chapter 17, 7 are satisfied. 8 features: [Proxy, Reflect.construct] 9 ---*/ 10 11 assert(Object.isExtensible(Proxy.revocable), 'Object.isExtensible(Proxy.revocable) must return true'); 12 assert.sameValue(typeof Proxy.revocable, 'function', 'The value of `typeof Proxy.revocable` is "function"'); 13 assert.sameValue( 14 Object.prototype.toString.call(Proxy.revocable), 15 '[object Function]', 16 'Object.prototype.toString.call(Proxy.revocable) must return "[object Function]"' 17 ); 18 assert.sameValue( 19 Object.getPrototypeOf(Proxy.revocable), 20 Function.prototype, 21 'Object.getPrototypeOf(Proxy.revocable) must return the value of Function.prototype' 22 ); 23 24 assert.sameValue( 25 Proxy.revocable.hasOwnProperty('prototype'), 26 false, 27 'Proxy.revocable.hasOwnProperty(\'prototype\') must return false' 28 ); 29 30 reportCompare(0, 0);