summaryrefslogtreecommitdiffstats
path: root/js/src/tests/test262/language/module-code/namespace/internals/get-str-found-uninit.js
blob: 384c09599ca329e3a232a5b7c804c14fb65a643a (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
37
38
// |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-get-p-receiver
description: >
    Behavior of the [[Get]] internal method with a string argument for exported
    uninitialized bindings.
info: |
    [...]
    12. Let targetEnvRec be targetEnv's EnvironmentRecord.
    13. Return ? targetEnvRec.GetBindingValue(binding.[[BindingName]], true).
flags: [module]
features: [let]
---*/

import * as ns from './get-str-found-uninit.js';

assert.throws(ReferenceError, function() {
  ns.local1;
});
assert.throws(ReferenceError, function() {
  ns.renamed;
});
assert.throws(ReferenceError, function() {
  ns.indirect;
});
assert.throws(ReferenceError, function() {
  ns.default;
});

export let local1 = 23;
let local2 = 45;
export { local2 as renamed };
export { local1 as indirect } from './get-str-found-uninit.js';
export default null;

reportCompare(0, 0);