summaryrefslogtreecommitdiffstats
path: root/js/src/jit-test/tests/modules/inline-data.js
blob: 9c56856f8d565bc3766cd4326bb24026138f05c9 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
// |jit-test| module

import { a } from "javascript: export let a = 42;";
assertEq(a, 42);

let result = null;
let error = null;
let promise = import("javascript: export let b = 100;");
promise.then((ns) => {
    result = ns;
}).catch((e) => {
    error = e;
});

drainJobQueue();
assertEq(error, null);
assertEq(result.b, 100);