summaryrefslogtreecommitdiffstats
path: root/js/src/tests/test262/language/module-code/namespace/internals/has-property-str-found-init.js
blob: 3dc01c249e3bc7ec600a1430de201d2b23e73aa5 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
// |reftest| module
// Copyright (C) 2016 the V8 project authors. All rights reserved.
// This code is governed by the BSD license found in the LICENSE file.
/*---
esid: sec-module-namespace-exotic-objects-hasproperty-p
description: >
    Behavior of the [[HasProperty]] internal method with a string argument for
    exported initialized bindings.
info: |
    [...]
    2. Let exports be the value of O's [[Exports]] internal slot.
    3. If P is an element of exports, return true.
flags: [module]
features: [Reflect]
---*/

import * as ns from './has-property-str-found-init.js';
export var local1;
var local2;
export { local2 as renamed };
export { local1 as indirect } from './has-property-str-found-init.js';
export default null;

assert('local1' in ns, 'in: local1');
assert(Reflect.has(ns, 'local1'), 'Reflect.has: local1');

assert('renamed' in ns, 'in: renamed');
assert(Reflect.has(ns, 'renamed'), 'Reflect.has: renamed');

assert('indirect' in ns, 'in: indirect');
assert(Reflect.has(ns, 'indirect'), 'Reflect.has: indirect');

assert('default' in ns, 'in: default');
assert(Reflect.has(ns, 'default'), 'Reflect.has: default');

reportCompare(0, 0);