Tuesday, 2 May 2017

IDEA nodejs mocha tests are recognized, but run as code

In IntelliJ IDEA Ultimate 2017.1, I have a large nodejs project with many NPM modules. Most of them contain test sub-dir with Mocha tests. IDEA recognizes and runs tests (describe() + it()) for most projects just fine, showing a nice testing interface with run results, except for one. For one project, it recognizes the tests (shows green arrows on the right of describe and it), but when ran, it runs it as regular code with the node interpreter, which obviously fails.

How do I ensure the project's test is ran as Mocha?

P.S. When I added a "mocha" debug profile, it runs fine if i start the mocha run/debug profile by hand.



via Yurik

No comments:

Post a Comment