Debian Codegraph @

js/src/tests/test262/language/expressions/dynamic-import/catch/nested-async-function-await-eval-rqstd-abrupt-urierror.js

raw
1 // |reftest| async
2 // This file was procedurally generated from the following sources:
3 // - src/dynamic-import/eval-rqstd-abrupt-urierror.case
4 // - src/dynamic-import/catch/nested-async-function-await.template
5 /*---
6 description: Abrupt completion during module evaluation precludes further evaluation (nested in async function, awaited)
7 esid: sec-import-call-runtime-semantics-evaluation
8 features: [dynamic-import]
9 flags: [generated, async]
10 info: |
11 ImportCall :
12 import( AssignmentExpression )
13
14 1. Let referencingScriptOrModule be ! GetActiveScriptOrModule().
15 2. Assert: referencingScriptOrModule is a Script Record or Module Record (i.e. is not null).
16 3. Let argRef be the result of evaluating AssignmentExpression.
17 4. Let specifier be ? GetValue(argRef).
18 5. Let promiseCapability be ! NewPromiseCapability(%Promise%).
19 6. Let specifierString be ToString(specifier).
20 7. IfAbruptRejectPromise(specifierString, promiseCapability).
21 8. Perform ! HostImportModuleDynamically(referencingScriptOrModule, specifierString, promiseCapability).
22 9. Return promiseCapability.[[Promise]].
23
24
25 [...]
26 6. For each String required that is an element of
27 module.[[RequestedModules]] do,
28 a. Let requiredModule be ? HostResolveImportedModule(module, required).
29 b. Perform ? requiredModule.ModuleEvaluation().
30
31 ---*/
32
33 async function f() {
34 await import('./eval-rqstd-abrupt-err-uri_FIXTURE.js').catch(error => {
35
36 assert.sameValue(error.name, 'URIError');
37
38 }).then($DONE, $DONE);
39 }
40
41 f();