Debian Codegraph @

js/src/tests/test262/language/expressions/dynamic-import/import-attributes/2nd-param-yield-expr.js

raw
1 // |reftest| shell-option(--enable-import-attributes) skip-if(!xulRuntime.shell) async -- requires shell-options
2 // Copyright (C) 2021 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 ImportCall parameter list forwards the Yield production parameter - YieldExpression
7 esid: sec-import-call-runtime-semantics-evaluation
8 info: |
9 ImportCall[Yield, Await]:
10 import ( AssignmentExpression[+In, ?Yield, ?Await] ,opt )
11 import ( AssignmentExpression[+In, ?Yield, ?Await] , AssignmentExpression[+In, ?Yield, ?Await] ,opt )
12 features: [dynamic-import, import-attributes]
13 flags: [async]
14 ---*/
15
16 var promise;
17
18 var iter = (function * () {
19 promise = import('./2nd-param_FIXTURE.js', yield);
20 }());
21
22 iter.next();
23
24 assert.sameValue(promise, undefined);
25
26 iter.next();
27
28 promise
29 .then(function(module) {
30 assert.sameValue(module.default, 262);
31 })
32 .then($DONE, $DONE);