Closed ludekvodicka closed 2 years ago
I found out that this can be easily solved by source-map support.
In case anyone else would need it:
Just install source-map-support: npm i source-map-support
,
allow sourceMap
in tsconfig.json: "sourceMap": true,
and configure support in settings.json
file:
"mochaExplorer.files": "build/**/*.test.js",
"mochaExplorer.require": "source-map-support/register",
"mochaExplorer.watch": "build/**/*.test.js",
And done ;-)
Hi, I would like to ask for help. I'm trying to find a way how to configure mocha test explorer to be able to execute a custom ts-node/esm loader.
this is my test script configuerd in package.json as same as in launch.json/tasks.json where wors fine:
"mocha -r ts-node/register --loader=ts-node/esm --no-warnings=ExperimentalWarning --experimental-specifier-resolution=node --timeout 999999 --colors --recursive './**/*.test.ts' --ignore './**/node_modules/**'
Unfortunately, I didn't find a way how to configure the same settings also to Mocha test explorer.
I tried to use nodeArgv configuration:
but this causes frozen (probably) freezing of worker\bundle.js :
Don't you have any example how to make this work, please?
Thanks