« Back

Unit testing of Node.js with Mocha and Istanbul

18 May 2015 by

Useful tips

Basic usage

./node_modules/.bin/_mocha --reporter spec

This command will help you run just a subset of tests in a given directory.

./node_modules/.bin/_mocha recursive test/my-subdir

Quick coverage check

./node_modules/.bin/istanbul cover ./node_modules/.bin/_mocha

Tags: node