Debian Codegraph @

js/src/tests/test262/language/module-code/namespace/internals/get-str-found-uninit.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 uninitialized bindings.
9 info: |
10 [...]
11 12. Let targetEnvRec be targetEnv's EnvironmentRecord.
12 13. Return ? targetEnvRec.GetBindingValue(binding.[[BindingName]], true).
13 flags: [module]
14 features: [let]
15 ---*/
16
17 import * as ns from './get-str-found-uninit.js';
18
19 assert.throws(ReferenceError, function() {
20 ns.local1;
21 });
22 assert.throws(ReferenceError, function() {
23 ns.renamed;
24 });
25 assert.throws(ReferenceError, function() {
26 ns.indirect;
27 });
28 assert.throws(ReferenceError, function() {
29 ns.default;
30 });
31
32 export let local1 = 23;
33 let local2 = 45;
34 export { local2 as renamed };
35 export { local1 as indirect } from './get-str-found-uninit.js';
36 export default null;
37
38 reportCompare(0, 0);