Debian Codegraph @

js/src/tests/test262/language/expressions/dynamic-import/eval-export-dflt-expr-in.js

raw
1 // |reftest| module async
2 // Copyright (C) 2018 Rick Waldron. All rights reserved.
3 // Copyright (C) 2016 the V8 project authors. All rights reserved.
4 // This code is governed by the BSD license found in the LICENSE file.
5 /*---
6 description: >
7 The `in` operator may occur within an exported AssignmentExpression
8 esid: sec-moduleevaluation
9 info: |
10 [...]
11 16. Let result be the result of evaluating module.[[ECMAScriptCode]].
12 [...]
13
14 15.2.3 Exports
15
16 Syntax
17
18 ExportDeclaration :
19
20 export default [lookahead ∉ { function, class }] AssignmentExpression[In];
21 flags: [async, module]
22 features: [dynamic-import]
23 ---*/
24 var x = { x: true };
25
26 export default 'x' in x;
27 import('./eval-export-dflt-expr-in.js').then(imported => {
28 assert.sameValue(imported.default, true);
29 }).then($DONE, $DONE).catch($DONE);