istanbul
istanbul copied to clipboard
I can't get Istanbul to work with Mocha (--delay) and ESM
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?