Skip to content
This repository has been archived by the owner on Feb 6, 2024. It is now read-only.

sota1235/mocha_training

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

38 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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 [email protected]: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

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published