Mocha
☕️ Classic, reliable, trusted test framework for Node.js and the browser observed · 2026-10-17
Health v2 · maintenance only
99/100
- Activity 100
- Release rhythm 97
- Longevity 100
How is this computed?
round(0.45*activity + 0.35*rhythm + 0.20*longevity); archived -> min(score, 10) — computed 2026-10-21. Adoption (stars, forks) is never an input.
- gap_med: 14.5
- age_days: 5706
- days_rel: 20
- days_push: 4
- n_releases_24m: 27
Adoption not part of the score
22902 stars · 3166 forks observed · 2026-10-17
What it is AI-extracted, prompt v1, taxonomy v1, 2026-10-12, confidence 0.99
Mocha is a feature‑rich JavaScript test framework that runs on Node.js and in the browser. It provides a flexible BDD/TDD interface, asynchronous support, and powerful hooks for setup and teardown.
Use cases
- run unit tests for a Node.js project
- write integration tests for a web application
- execute asynchronous tests with promises or callbacks
- use Mocha as a test runner in a CI pipeline
- run browser‑based tests for front‑end code
- combine Mocha with any assertion library like Chai or Expect
When to choose
- You need a mature, widely adopted test runner for JavaScript/Node.js.
- You want flexibility to use any assertion library or custom reporters.
- Your project requires support for both synchronous and asynchronous tests.
- You need a simple CLI that can be integrated into npm scripts or CI.
When to avoid
- You prefer an all‑in‑one framework that includes assertions, mocking, and coverage out of the box (e.g., Jest).
- You need built‑in test isolation or sandboxing features.
- Your codebase is not JavaScript/Node.js based.
Facets
library · maturity active
testing cli developer-tools testing browser cli bdd tdd javascript async-testing hooks assertion-agnostic nodejs
10 sources
- readme: https://github.com/mochajs/mocha · fetched 2026-10-17 · 3c916b5cc7fc
- homepage: https://mochajs.org · fetched 2026-09-28 · 42c6e6d3530b
- site_page: https://mochajs.org/getting-started · fetched 2026-09-28 · c5e5008b0bdd
- site_page: https://mochajs.org/features/arrow-functions · fetched 2026-09-28 · 2414b2808a52
- site_page: https://mochajs.org/features/assertions · fetched 2026-09-28 · a53abfbd0bc0
- site_page: https://mochajs.org/features/asynchronous-code · fetched 2026-09-28 · 394b7a0824e0
- site_page: https://mochajs.org/features/diffs · fetched 2026-09-28 · dfd5e9467f73
- site_page: https://mochajs.org/features/error-codes · fetched 2026-09-28 · 671e3979283f
- site_page: https://mochajs.org/features/global-fixtures · fetched 2026-09-28 · 23e52985ecd5
- site_page: https://mochajs.org/features/hooks · fetched 2026-09-28 · f61a13e262f8
Member repositories
| Repository | Role | Health v2 |
|---|---|---|
| mochajs/mocha | main | 99 |
| mochajs/mocha-examples | examples | 75 |
For agents
Data as of 2026-10-19T08:05:51.212177+00:00 · Report a problem