object-propertyIsEnumerable-binding-uninit.js (1087B)
1 // |reftest| module 2 // Copyright (C) 2017 André Bargull. All rights reserved. 3 // This code is governed by the BSD license found in the LICENSE file. 4 5 /*--- 6 esid: sec-object.prototype.propertyisenumerable 7 description: > 8 Test Object.prototype.propertyIsEnumerable() with uninitialized binding. 9 info: | 10 19.1.3.4 Object.prototype.propertyIsEnumerable ( V ) 11 ... 12 3. Let desc be ? O.[[GetOwnProperty]](P). 13 ... 14 15 9.4.6.4 [[GetOwnProperty]] (P) 16 ... 17 4. Let value be ? O.[[Get]](P, O). 18 ... 19 20 9.4.6.7 [[Get]] (P, Receiver) 21 ... 22 12. Let targetEnvRec be targetEnv's EnvironmentRecord. 23 13. Return ? targetEnvRec.GetBindingValue(binding.[[BindingName]], true). 24 25 8.1.1.1.6 GetBindingValue ( N, S ) 26 ... 27 If the binding for N in envRec is an uninitialized binding, throw a ReferenceError exception. 28 ... 29 30 flags: [module] 31 ---*/ 32 33 import* as self from "./object-propertyIsEnumerable-binding-uninit.js"; 34 35 assert.throws(ReferenceError, function() { 36 Object.prototype.propertyIsEnumerable.call(self, "default"); 37 }); 38 39 export default 0; 40 41 reportCompare(0, 0);