node-api-testing-example
node-api-testing-example copied to clipboard
How to run the tests...
Hey there, Figured this was a good place to toss a comment. Neat article. One thing I noticed, as it seems to be targeted at first time test builders, that you don't describe how to actually runs the tests.
I'd suggest maybe adding a paragraph about running mocha, and how to add a test command to the scripts section of a package.json
Also would be helpful to convert the code samples to inline code as opposed to images.
nice
firstly, you need to install mocha
,chai
and supertest
.
secondly you should run the command node server.js
.
then run ./node_modules/mocha/bin/mocha
.