Training to write unit tests with using mocha.js
Let's polish the technique to write unit tests.
- node.js 6.2.1
- npm 3.9.3
- Run test
Using mocha.
$ npm run test
$ git clone [email protected]:sota1235/mocha_training.git && npm i
- Level1
Test src/level1/calc.js
Learning basic usage of mocha.js and assert.
- Level2
Test src/level2/string-util.js
Learning testing method using RegExp.
- Level3
Test src/level3/string-util.js
Learning TDD.
- Level4
Test src/level4/subscriber.js
Learning spy with using sinon.js
- Level5
Test src/level5/http-client.js
Learning how to using stub with proxyquire.js
Please give me Pull Request.
This software is released under the MIT License, see LICENSE.txt.