gotwarlost/istanbul

I can't get Istanbul to work with Mocha (--delay) and ESM

jrgleason opened this issue · 1 comments

I have the following mocha command that I run for my tests...

istanbul cover mocha --delay --exit ./test/suite.js

async function wire(){
    await import("./Class.spec");
    ...
    run();
}
wire();

When I run I get...

(node:20108) ExperimentalWarning: The ESM module loader is experimental.
I:\Code\praesto-dna\packages\services\packages\callminer\node_modules.bin\mocha.CMD:1
(function (exports, require, module, __filename, __dirname) { @if EXIST "%~dp0\node.exe" (
^

SyntaxError: Invalid or unexpected token
at new Script (vm.js:79:7)

How do I get this to work with my ESM mocha tests?

Same here please assist?