summaryrefslogtreecommitdiffstats
path: root/js/src/jit-test/tests/modules/bug-1787926.js
blob: fb710143599ee8497bda699a2a93caa8837ce3f3 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
let m = registerModule('m', parseModule(`import {} from "s";`));
let l = registerModule('l', parseModule(`import {} from "s";`));
let s = registerModule('s', parseModule(`await 0;`));

let state = "init";

moduleLink(m);
moduleEvaluate(m).then(() => { state = "loaded"; });
drainJobQueue();

assertEq(state, "loaded");

import("l").then(() => { state = "complete"; });
drainJobQueue();

assertEq(state, "complete");