summaryrefslogtreecommitdiffstats
path: root/js/src/jit-test/tests/modules/bug-1420420-4.js
blob: 6181183ce3115c17260b46abad51920d9f87a85c (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
load(libdir + "asserts.js");

registerModule("a", parseModule(`throw undefined`));

let b = registerModule("b", parseModule(`import "a";`));
let c = registerModule("c", parseModule(`import "a";`));

moduleLink(b);
moduleLink(c);

(async () => {
  let count = 0;
  try { await moduleEvaluate(b) } catch (e) { count++; }
  try { await moduleEvaluate(c) } catch (e) { count++; }
  assertEq(count, 2);
})();

drainJobQueue();