sayanaka / mocha_training

Unit test training with using mocha.js

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

mocha training

Training to write unit tests with using mocha.js

Description

Let's polish the technique to write unit tests.

Requirement

  • node.js 6.2.1
  • npm 3.9.3

Usage

  • Run test

Using mocha.

$ npm run test

Install

$ git clone git@github.com:sota1235/mocha_training.git && npm i

Challenges

  • 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

Contribution

Please give me Pull Request.

Licence

This software is released under the MIT License, see LICENSE.txt.

Author

@sota1235

About

Unit test training with using mocha.js

License:MIT License


Languages

Language:JavaScript 100.0%