Open christian-schwaderer opened 1 year ago
I have a mixed JavaScript/TypeScript project. For running, the JavaScript files are getting transpiled via babel-node.
babel-node
Now, I'm trying to set-up ts-mocha for running tests. However, I keep getting
ts-mocha
src/index.js:3 import 'whatever'; ^^^^^^ SyntaxError: Cannot use import statement outside a module
I guess, I would need to pass something like --compilers js:@babel/register to mocha. But how do I do that when using ts-mocha?
--compilers js:@babel/register
mocha
I have a mixed JavaScript/TypeScript project. For running, the JavaScript files are getting transpiled via
babel-node
.Now, I'm trying to set-up
ts-mocha
for running tests. However, I keep gettingI guess, I would need to pass something like
--compilers js:@babel/register
tomocha
. But how do I do that when usingts-mocha
?