Mocha is a wonderful testing framework for node.js, however the documentation seems to be lacking.
When I first begin to write in Mocha, I had many questions:
- what exactly does
- what is the effect of nesting
describe() multiple levels?
describe() a test suite, and
it() a test case?
- where should I place
I didn’t find the answer online, hence I simply test it out myself.
I also used docco to generate a more-pleasing-to-read documentation for the gist.