Mocha
- Category
- Frameworks and libraries
- Docs outline
- 16 sections
Official docs outline
mochajs.org- Getting Started
Installing Mocha and writing first tests with describe and it.
- Run Cycle Overview
How Mocha loads files, runs hooks and reports.
- Asynchronous Code
Callbacks, promises and async/await tests.
- Hooks
before, after, beforeEach, afterEach hooks.
- Interfaces
BDD, TDD, exports, QUnit and require styles.
- Pending and Exclusive Tests
Skipping tests and using only.
- Retrying Tests
Retrying flaky tests.
- Timeouts
Suite, test and hook timeouts.
- Dynamically Generating Tests
Generating tests from data.
- Assertions
Using Node assert, Chai, Should.js and other libraries.
- Command-Line Usage
CLI flags such as --grep, --watch, --require, --parallel.
- Configuring Mocha
Config files, package.json, .mocharc and precedence.
- Parallel Mode
Running test files in worker processes.
- Root Hook Plugins
Defining global hooks via plugins.
- Reporters
Built-in and third-party reporters.
- ESM and TypeScript
Native ESM support and TypeScript usage.
Each section links to the official page. Titles and summaries by Extra Credit; the docs belong to their authors.