Debian Codegraph @

js/src/tests/test262/language/module-code/namespace/internals/get-str-found-init.js

raw
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-get-p-receiver
6 description: >
7 Behavior of the [[Get]] internal method with a string argument for exported
8 initialized bindings.
9 info: |
10 [...]
11 12. Let targetEnvRec be targetEnv's EnvironmentRecord.
12 13. Return ? targetEnvRec.GetBindingValue(binding.[[BindingName]], true).
13 flags: [module]
14 ---*/
15
16 import * as ns from './get-str-found-init.js';
17 export var local1 = 23;
18 var local2 = 45;
19 export { local2 as renamed };
20 export { local1 as indirect } from './get-str-found-init.js';
21 export default 444;
22
23 assert.sameValue(ns.local1, 23);
24 assert.sameValue(ns.renamed, 45);
25 assert.sameValue(ns.indirect, 23);
26 assert.sameValue(ns.default, 444);
27
28 reportCompare(0, 0);