Bug 1892041 - Part 2: Update test262. r=spidermonkey-reviewers,dminor
[gecko.git] / js / src / tests / test262 / language / module-code / instn-local-bndng-export-gen.js
blob3640cd38e3a61b0ed5bbd72537209e5928de3f73
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 and initialized to `undefined` for exported generator
7     function declarations
8 esid: sec-moduledeclarationinstantiation
9 info: |
10     [...]
11     17. For each element d in lexDeclarations do
12         a. For each element dn of the BoundNames of d do
13            i. If IsConstantDeclaration of d is true, then
14               [...]
15            ii. Else,
16                1. Perform ! envRec.CreateMutableBinding(dn, false).
17     [...]
18 includes: [fnGlobalObject.js]
19 flags: [module]
20 ---*/
22 var global = fnGlobalObject();
24 assert.sameValue(test262().next().value, 23, 'initialized value');
25 assert.sameValue(
26   Object.getOwnPropertyDescriptor(global, 'test262'), undefined
29 test262 = null;
31 assert.sameValue(test262, null, 'binding is mutable');
33 export function* test262() { return 23; }
35 reportCompare(0, 0);