CodeBrowser / npm / mocha
mocha@11.7.6
// simple, flexible, fun test framework
$ npm install mocha
downloads/wk
12,972,988
license
MIT
version
11.7.6
published
May 21, 2026
What is mocha?
Mocha is a JavaScript test framework that runs tests in Node.js and the browser, supporting multiple testing styles like BDD, TDD, and TAP. Developers use Mocha to write and execute unit tests for their code, often pairing it with assertion libraries like Chai to verify expected behavior. It's a straightforward choice for testing JavaScript projects when you want flexibility in how you structure and run your tests.
Keywords
#mocha #test #bdd #tdd #tap #testing #chai #assertion #ava #jest #tape #jasmine #karma
Maintainers
joshuakgoldberg, mark-wiemer