I am trying to configure Mocha for IntelliJ, and when Googling, I keep finding posts that say "install the mocha plugin".
I don't have a Mocha plugin. I go to Settings → Plugins → (install JetBrains plugin) / (browse repositories)
but when I type mocha
it comes up empty.
(Side question: can anyone tell me the difference between the menu options above, please?)
What am I missing?
These are the posts I've run into so far:
Install Mocha In the embedded Terminal ( Alt+F12 ) , type one of the following commands: npm install mocha for local installation in your project. npm install -g mocha for global installation. npm install --save-dev mocha to install Mocha as a development dependency.
Mocha integration is included with another plugin (I'm going to guess the NodeJS plugin). If you install that plugin, and then go to manually add a Run Configuration, mocha will be an option . In the Webstorm 7.0.2 blog post, there is an embedded YouTube video which shows you how to configure a Mocha test directory:
http://blog.jetbrains.com/webstorm/2013/11/webstorm-7-0-2-is-available/
You dont have to install Mocha Plugin. Infact Mocha is not available as plugin in IntelliJ IDEA IDE. Just install Node & using node package manager install Mocha.
From Menu click on Run > Edit Configuartion
Click on Add button (+ icon) & select Mocha from here. Specify Working Directory, Test Directory, Mocha Package
(Local node module folder where Mocha is installed) & you are good to go.
Mocha comes bundled with the NodeJS plugin in IntelliJ Idea.
If you don't have it, install the NodeJS plugin:
Preferences > Plugins > NodeJS
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With