IntelliJ ultimate code coverage feature disabled
I created a config for running mocha based unit tests in IntelliJ. According to the documentation if I install nyc, it should enable code coverage in the IDE, but the icon is disabled. What am I missing?
Please sign in to leave a comment.
What IDEA version do you work with? Can you attach a screenshot of your run configuration?
IntelliJ IDEA 2017.1.5 (Ultimate)
Code coverage for Mocha is supported since 2017.2 - see https://www.jetbrains.com/webstorm/whatsnew/#v2017-2-mocha, https://blog.jetbrains.com/webstorm/2017/06/webstorm-2017-2-eap-172-2953/. There is no such feature in 2017.1.x. Please try upgrading
Thanks updating the version gave me the option. Now that I ran it I can see it's ignoring my .jsx files. Normally when I run nyc at the command prompt I run this.
Is there a place to add the --extension .jsx portion to what IntelliJ is doing?
You can specify additional extensions in .nycrc file or package.json, like:
see https://github.com/istanbuljs/nyc#configuring-nyc