summaryrefslogtreecommitdiffstats
path: root/js/src/jit-test/tests/debug/Script-isModule-01.js
blob: 85cae24ac3ed62a679e916a4e8405da3ae326bd7 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
// Debugger.Object.prototype.isModule

const g = newGlobal({newCompartment: true});
const dbg = Debugger(g);
let count = 0;
dbg.onNewScript = function (script) {
    count += 1;
    assertEq(script.isModule, true);
};
const m = g.parseModule("");
moduleLink(m);
moduleEvaluate(m);
assertEq(count, 1);