Mocha is a feature-rich JavaScript test framework running on Node.js and in the browser, making asynchronous testing straightforward and fun. Mocha tests run serially, allowing for flexible and accurate reporting, while mapping uncaught exceptions to the correct test cases.
Get StartedConfiguration Reference
Sponsors
Use Mocha at work? Ask your manager or marketing team if they’d help support our project. Your company’s logo will also be displayed on npmjs.com and our GitHub repository.
Backers
Find Mocha helpful? Become a backer and support Mocha with a monthly donation.
More Information
In addition to chatting with us on our Discord, for additional information such as using spies, mocking, and shared behaviours be sure to check out the Mocha Wiki on GitHub. For a running example of Mocha, view example/tests.html.
For the JavaScript API, view the API documentation or the source.