has-property-str-found-init.js (1162B)
1 // |reftest| module 2 // Copyright (C) 2016 the V8 project authors. All rights reserved. 3 // This code is governed by the BSD license found in the LICENSE file. 4 /*--- 5 esid: sec-module-namespace-exotic-objects-hasproperty-p 6 description: > 7 Behavior of the [[HasProperty]] internal method with a string argument for 8 exported initialized bindings. 9 info: | 10 [...] 11 2. Let exports be the value of O's [[Exports]] internal slot. 12 3. If P is an element of exports, return true. 13 flags: [module] 14 features: [Reflect] 15 ---*/ 16 17 import * as ns from './has-property-str-found-init.js'; 18 export var local1; 19 var local2; 20 export { local2 as renamed }; 21 export { local1 as indirect } from './has-property-str-found-init.js'; 22 export default null; 23 24 assert('local1' in ns, 'in: local1'); 25 assert(Reflect.has(ns, 'local1'), 'Reflect.has: local1'); 26 27 assert('renamed' in ns, 'in: renamed'); 28 assert(Reflect.has(ns, 'renamed'), 'Reflect.has: renamed'); 29 30 assert('indirect' in ns, 'in: indirect'); 31 assert(Reflect.has(ns, 'indirect'), 'Reflect.has: indirect'); 32 33 assert('default' in ns, 'in: default'); 34 assert(Reflect.has(ns, 'default'), 'Reflect.has: default'); 35 36 reportCompare(0, 0);