1 // |reftest| module async
2 // Copyright (C) 2020 Ecma International. All rights reserved.
3 // This code is governed by the BSD license found in the LICENSE file.
6 description: Dynamic import can't preempt DFS evaluation order
7 esid: sec-moduleevaluation
9 Evaluate ( ) Concrete Method
11 1. Assert: This call to Evaluate is not happening at the same time as another call to Evaluate within the surrounding agent.
13 flags: [module, async]
14 features: [dynamic-import]
17 import './verify-dfs-a_FIXTURE.js';
18 import './verify-dfs-b_FIXTURE.js';
20 // rely on function hoisting to create shared array
21 export function evaluated(name) {
22 if (!evaluated.order) {
25 evaluated.order.push(name);
28 export function check(promise) {
30 assert.sameValue(evaluated.order.length, 2);
31 assert.sameValue(evaluated.order[0], 'A');
32 assert.sameValue(evaluated.order[1], 'B');