Mocha is a JavaScript test framework that runs on Node.js and in the browser. It allows you to write test cases for your application in a simple and easy-to-read syntax. Mocha tests are written using the JavaScript language, and they can be run in any JavaScript environment. Mocha provides a number of useful features, such as the ability to run tests in parallel, the ability to test asynchronous code, and the ability to test the code in a browser using a test runner like Karma. Mocha is often paired with assertion libraries like Chai or Expect.js. Overall it is a flexible and simple testing framework that allows developers to write comprehensive and accurate tests for their applications.

NPM downloads

Github stars

Github forks

Number of contributors

Number of contributors 30 days




Number of Contributors


Number of days since last commit


Top contributors all time

TJ Holowaychuk1105
Christopher Hiller721
Travis Jeffery199
Juerg B137
Peter Müller87
Daniel St. Jules83
Craig Taub74
David da Silva Contín68
Joshua Appelman65
P. Roebuck37
Guillermo Rauch33
Ariel Mashraki20
JeongHoon Byun (aka Outsider)20
Scott Santucci17
Attila Domokos13
JeongHoon Byun (a.k.a Outsider)12

Top contributors last 30 days

Aras Abbasi5
Josh Goldberg ✨1


Mocha test framework

☕️ Simple, flexible, fun JavaScript test framework for Node.js & The Browser ☕️

GitHub Actions Build Status Coverage Status FOSSA Status Gitter OpenCollective OpenCollective

NPM Version Node Version

Mocha Browser Support h/t SauceLabs



Become a backer and show your support to our open source project on our site.


Does your company use Mocha? Ask your manager or marketing team if your company would be interested in supporting our project. Support will allow the maintainers to dedicate more time for maintenance and new features for everyone. Also, your company's logo will show on GitHub and on our site - who doesn't want a little extra exposure? Here's the info.

MochaJS Sponsor
MochaJS Sponsor
MochaJS Sponsor
MochaJS Sponsor


You might want to know that:

  • Mocha is one of the most-depended-upon modules on npm (source:, and
  • Mocha is an independent open-source project, maintained exclusively by volunteers.

You might want to help:

Finally, come chat with the maintainers on Gitter if you want to help with:

  • Triaging issues, answering questions
  • Review, merging, and closing pull requests
  • Other project-maintenance-y things


Copyright 2011-2022 OpenJS Foundation and contributors. Licensed MIT.

FOSSA Status