blob: ce355078b00168ac54061ea5ea90853579d00981 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
|
// |jit-test| --enable-top-level-await;
"use strict";
load(libdir + "asserts.js");
class UniqueError extends Error {}
let a = registerModule('a', parseModule(`
throw new UniqueError();
`));
let b = registerModule('b', parseModule(`
import * as ns0 from "a";
`));
a.declarationInstantiation();
a.evaluation()
.then(r => {
// We should not reach here, as we expect an error to be thrown.
assertEq(false, true);
})
.catch(e => assertEq(e instanceof UniqueError, true));
b.declarationInstantiation();
b.evaluation()
.then(r => {
// We should not reach here, as we expect an error to be thrown.
assertEq(false, true);
})
.catch(e => assertEq(e instanceof UniqueError, true));
drainJobQueue();
|