mocha Documentation

️ Classic, reliable, trusted test framework for Node.js and the browser

22,904 stars JavaScript JavaScript 1 file · ~1,104 tokens #bdd#browser#javascript#mocha#mochajs#node#nodejs#tdd
RAW Doc

1. Project Overview & Quickstart (mochajs/mocha)

File: README.md

Backers

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

Sponsors

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.




Development

You might want to know that:

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

You might want to help:

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

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

License

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


File: docs/README.md

Mocha Docs: Built on Astro Starlight

This is the current Mocha documentation website, hosted at mochajs.org and built with Astro Starlight.

For details on the legacy site, see https://github.com/mochajs/docs-legacy.

Preview the new site

To run this site:

shell
cd docs
npm i
npm run generate
npm run dev

2. Official Technical Reference & Guides (mochajs/docs-legacy)

File: README.md

mochajs.org

These are the legacy docs for Mocha built using Eleventy, a simple static site generator.
They used to be served on mochajs.org; now they're served on legacy.mochajs.org.

Development

  1. Run npm install from working copy root to get Node.js deps.
  2. To include the API documentation, run npm run api before the either of the following commands.
  3. To serve the site and rebuild as changes are made, run npm run watch.
  4. To rebuild the site once, run npm run docs.
  5. To preview the site, run npm run preview.

Notes

  • The content lives in index.md; everything else is markup, scripts, assets, etc.
  • This file (README.md) should not be included in the build.
  • _site_ is where the deployed site lives. This directory is not under version control.

File: changelogs/README.md

Historical Changelogs

These are changelogs for (very) old versions of Mocha.

These changelogs are not included in the website, and are here only for archival purposes.

If you're looking for the current changelog, here is the current changelog.