Bug 1892041 - Part 2: Update test262. r=spidermonkey-reviewers,dminor
[gecko.git] / js / src / tests / test262 / language / module-code / instn-local-bndng-export-let.js
blobb7f473676569a75f460f3162549924c024f63710
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 description: >
6     Binding is created but not initialized for exported `let` statements
7 esid: sec-moduledeclarationinstantiation
8 info: |
9     [...]
10     17. For each element d in lexDeclarations do
11         a. For each element dn of the BoundNames of d do
12            i. If IsConstantDeclaration of d is true, then
13               [...]
14            ii. Else,
15                1. Perform ! envRec.CreateMutableBinding(dn, false).
16     [...]
17 includes: [fnGlobalObject.js]
18 flags: [module]
19 ---*/
21 var global = fnGlobalObject();
23 assert.throws(ReferenceError, function() {
24   typeof test262;
25 }, 'Binding is created but not initialized.');
26 assert.sameValue(
27   Object.getOwnPropertyDescriptor(global, 'test262'), undefined
30 export let test262 = 23;
32 reportCompare(0, 0);