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

moduleRepo["a"] = parseModule(`throw undefined`);

let b = moduleRepo["b"] = parseModule(`import "a";`);
let c = moduleRepo["c"] = parseModule(`import "a";`);

b.declarationInstantiation();
c.declarationInstantiation();

let count = 0;
try { b.evaluation() } catch (e) { count++; }
try { c.evaluation() } catch (e) { count++; }
assertEq(count, 2);