-
Notifications
You must be signed in to change notification settings - Fork 214
added webstorm mocha runner documentation #1208
Conversation
packages/mocha/README.md
Outdated
## Webstorm Mocha Runner | ||
Webstorm has a mocha runner that enables running mocha tests within the IDE. The mocha runner also allows for debugging of mocha tests in Webstorm. Basic setup can be found at [Webstorm's Mocha Run/Debug documentation](https://www.jetbrains.com/help/webstorm/run-debug-configuration-mocha.html). _Note: since neutrino takes care of installing mocha, you do not need to install mocha separately._ Once you are familiar with the basics, the following steps will allow you to use Webstorm's mocha runner with neutrino. | ||
|
||
- create a `.babelrc` in project root. _As of `neutrino 8.x`, the config provided assumes neutrino is still relying on `babel 6.x`. If neutrino updates to use `babel 7.x`, then the plugin names below will likely need to be updated to reflect the updated `babel 7.x` version._ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I wanted to use 1.
for numbered list, but I couldn't get markdown to continue the numbered list with the code snippet for .babelrc
. So I just resorted to using bullets instead, which is fine for me as well.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hi! Thank you for the PR.
The master
branch is currently for Neutrino 9, whereas the wording of the steps added here suggest they are based on Neutrino 8 which uses quite a different approach for configuring webpack/mocha/...
Could you update it to be compatible with Neutrino 9? (see #1129 for how to try the beta)
I believe the best way to set up webstorm with Neutrino 9 might be to create the mocha.config.js
file as suggested by the existing Neutrino Mocha preset docs, and then use the "Extra Mocha options" webstorm pref to pass the --require mocha.config.js
to mocha
.
Many thanks :-)
The require flag could also be set via mocha.opts too. |
ok - should be good for 9.x and 8.x now. I just verified on a new project using |
Thank you for updating the PR. The docs are versioned with the code, so each branch's docs only cover that specific version - eg: Could you remove the Neutrino 8 part? |
…ecific instructions
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks great - many thanks! :-)
Hi everyone,
This is my first time contributing. I was checking out neutrino and noticed there was no docs on how to get Webstorm's Mocha Runner working with neutrino. If this should be located elsewhere then lmk. Hope this helps someone 😄