Debian Codegraph @

js/src/tests/test262/language/module-code/top-level-await/dfs-invariant.js

raw
1 // |reftest| module
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: Parent completion orderings match the synchronous module behavior
6 info: |
7 6.2.4 AsyncModuleExecutionFulfilled ( module )
8
9 [...]
10 5. Let _execList_ be a new empty List.
11 6. Perform ! GatherAsyncParentCompletions(_module_, _execList_).
12 7. Let _sortedExecList_ be a List of elements that are the elements of
13 _execList_, in the order in which they had their [[AsyncEvaluating]]
14 fields set to *true* in InnerModuleEvaluation.
15 8. Assert: All elements of _sortedExecList_ have their [[AsyncEvaluating]]
16 field set to *true*, [[PendingAsyncDependencies]] field set to 0 and
17 [[EvaluationError]] field set to *undefined*.
18 [...]
19
20 Dependency graph for this test:
21
22 dfs-invariant.js
23 .-----------------------------------+-------.
24 | | v
25 | | dfs-invariant-indirect_FIXTURE.js
26 | .---|----------------------'
27 v v v
28 dfs-invariant-direct-1_FIXTURE.js dfs-invariant-direct-2_FIXTURE.js
29 '--------. .--------'
30 v v
31 dfs-invariant-async_FIXTURE.js
32 esid: sec-moduleevaluation
33 flags: [module]
34 features: [top-level-await, globalThis]
35 ---*/
36
37 import './dfs-invariant-direct-1_FIXTURE.js';
38 import './dfs-invariant-direct-2_FIXTURE.js';
39 import './dfs-invariant-indirect_FIXTURE.js';
40
41 assert.sameValue(globalThis.test262, 'async:direct-1:direct-2:indirect');
42
43 reportCompare(0, 0);