Samiksha Jaiswal (Editor)

Mocha (JavaScript framework)

Updated on
Edit
Like
Comment
Share on FacebookTweet on TwitterShare on LinkedInShare on Reddit
Written in
  
JavaScript

License
  
MIT

Initial release
  
22 November 2011 (2011-11-22)

Stable release
  
3.1.2 / 10 October 2016; 4 months ago (2016-10-10)

Repository
  
github.com/mochajs/mocha

Type
  
Test automation framework

Mocha is a JavaScript test framework running on node.js, featuring browser support, asynchronous testing, test coverage reports, and use of any assertion library.

Contents

Assertion Libraries

Mocha can be used with most JavaScript assertion libraries, including:

  • should.js
  • express.js
  • chai
  • better-assert
  • unexpected
  • Usage and examples

    $ mocha
    .
    1 test complete (1ms)

    For asynchronous testing, invoke the callback, and Mocha will wait for completion.

    References

    Mocha (JavaScript framework) Wikipedia