In order to begin tests we need these packages:
- mocha
- chai
To spy, stub or mock we need:
- sinon
In order to have test coverage reporting:
- istanbul
npm istall mocha --save-dev
npm install chai --save-dev
npm install sinon --save-dev
npm install istanbul --save-dev
npm install mocha-istanbul --save-devnpm installCode to be tested is in app folder
npm test
or
./node_modules/mocha/bin/mocha tests/*.js
./node_modules/.bin/istanbul cover node_modules/.bin/_mocha tests/*.js