How to debug Ecmascript 6 tests ?

Hi

I use the following command from the cli :     
./node_modules/.bin/mocha --check-leaks --throw-deprecation --growl --recursive --compilers js:babel/register src/test/

How can I debug them using intellij 14.1.4 ?

Thanks in advance

best

0
4 comments

You can do it using Mocha run configuration - see the screenshot:

mocha.png

Note that Mocha support is available as a part of NodeJS plugin - you need to install it using Settings/Plugins, Install JetBrains Plugin...

0
Avatar
Permanently deleted user

Hi Elena

Thanks for the help, that did it.

However, when debugging, launching the tests takes quite a while. Is there a way to make it faster ?

Thanks again

0

what node.js version do you use? There is a known issue with node.js > v.0.11.0 - see https://github.com/nodejs/io.js/issues/877. See https://youtrack.jetbrains.com/issue/WEB-16076#comment=27-981720 for a workaround

0
Avatar
Permanently deleted user

Well, you were right on spot, thanks a lot :)

However, while the workaround is working (debug starts fast), however I need the sourcemap... Hopefully the initial bug on V8 side is resolved soon!

thanks again

0

Please sign in to leave a comment.