I\'m having trouble getting Mocha to work as expected, and I\'d love to say as documented, but there (appears) to not be much documentation on actually getting the thing run
To run Mocha with
mocha
command from your terminal you need to install mocha globally onthis
machine:
npm install --global mocha
Then cd
to your projectFolder/test and run mocha yourTestFileName.js
If you want to make
mocha
available inside yourpackage.json
as a development dependency:
npm install --save-dev mocha
Then add mocha
to your scripts inside package.json
.
"scripts": {
"test": "mocha"
},
Then run npm test
inside your terminal.