Unit Testing using Mocha, Sinon, and Chai in NodeJS
We use Mocha as the test framework, Chai for assertions, and Sinon.js for creating Doubles. Here's the code for installation:
$ npm install sinon mocha chai --save-dev
--save-dev is used because these modules are only needed during development. We d...
dev.fandyaditya.com7 min read