---
title: "mocha 12.0.2 Breaking Changes on npm | Since.dev"
description: "What each mocha release removed, renamed or changed: 335 breaking changes in 35 versions on npm, each with its source."
canonical_url: https://since.dev/packages/npm/mocha
last_updated: 2026-12-04
---

# mocha breaking changes

mocha 12.0.2 (September 17, 2026) is its newest release with breaking changes, 2 of them. The first: CLI reporter-option now takes precedence over config file in mocha 12.0.2. Every breaking API change we have recorded in mocha on npm: 335 breaking changes in 35 versions. Below, its 35 versions with breaking changes, newest first, removals and renames first, each with its source.

Updated December 4, 2026

Latest version `12.0.3`, released October 1, 2026. [Source repository](https://github.com/mochajs/mocha)

Its 12.0.0-beta-1 release requires Node.js 20.19.0 or later. [Node.js end of life dates](https://since.dev/calendar/nodejs.md).

- From [11.6.0](#v-11-6-0) to [12.0.2](#v-12-0-2): 16 breaking changes in 10 versions.
- From [0.8.0](#v-0-8-0) to [12.0.2](#v-12-0-2): 334 breaking changes in 34 versions.

## mocha 12.0.2 breaking changes

mocha 12.0.2, released September 17, 2026: 2 breaking changes.

- **Behavior changed**  

Reporter options passed on the CLI now override the config file, so setups relying on config file precedence may see different reporter options. [github.com](https://github.com/mochajs/mocha/releases/tag/v12.0.2)
- **Behavior changed** `--exit`  

The window used to detect the --exit flag was widened. Code relying on exact timing of this detection may behave differently. [github.com](https://github.com/mochajs/mocha/releases/tag/v12.0.2)

## mocha 12.0.0-rc.4 breaking changes

mocha 12.0.0-rc.4, released August 31, 2026: 1 breaking change.

- **Behavior changed**  

The yargs dependency was replaced with Node.js util.parseArgs, which is marked as a breaking change. Code relying on yargs-specific CLI parsing may behave differently. [github.com](https://github.com/mochajs/mocha/releases/tag/v12.0.0-rc.4)

## mocha 12.0.0-rc.3 breaking changes

mocha 12.0.0-rc.3, released August 31, 2026: 2 breaking changes.

- **Behavior changed**  

CLI respawn paths were changed from yargs-unparser, which is marked as a breaking change. Users relying on previous respawn argument handling may see differences. [github.com](https://github.com/mochajs/mocha/releases/tag/v12.0.0-rc.3)
- **Behavior changed**  

CLI option loading was replaced, which is marked as a breaking change. Users relying on previous yargs-parser CLI parsing behavior may see differences. [github.com](https://github.com/mochajs/mocha/releases/tag/v12.0.0-rc.3)

## mocha 12.0.0-rc.2 breaking changes

mocha 12.0.0-rc.2, released August 31, 2026: 1 breaking change.

- **Behavior changed**  

The he dependency was replaced with manual HTML encoding, which is marked as a breaking change. Check any output that depended on the previous encoding. [github.com](https://github.com/mochajs/mocha/releases/tag/v12.0.0-rc.2)

## mocha 12.0.0-rc.1 breaking changes

mocha 12.0.0-rc.1, released August 31, 2026: 1 breaking change.

- **Behavior changed**  

The root package.json type is now module, which is a breaking change for code relying on CommonJS resolution of the package. [github.com](https://github.com/mochajs/mocha/releases/tag/v12.0.0-rc.1)

## mocha 12.0.0-beta-9.5 breaking changes

mocha 12.0.0-beta-9.5, released August 31, 2026: 2 breaking changes.

- **Removed** `bin._mocha`  

The bin/\_mocha entry point was removed and bin entry points were converted to ESM as a breaking change. [github.com](https://github.com/mochajs/mocha/releases/tag/v12.0.0-beta-9.5)
- **Behavior changed** `lookupFiles`  

lookupFiles() returns an array of strings for direct file paths, which may change how existing callers handle the result. [github.com](https://github.com/mochajs/mocha/releases/tag/v12.0.0-beta-9.5)

## Older versions

29 older versions, each with its first changes. [Sign up to see every change](https://app.since.dev/login?mode=signup&src=package-page)

### mocha 12.0.0-beta-9.4 breaking changes

mocha 12.0.0-beta-9.4, released August 31, 2026: 1 breaking change.

- **Removed**  

Unused legacy functions in errors.js were removed as a breaking change; code importing them must stop using them. [github.com](https://github.com/mochajs/mocha/releases/tag/v12.0.0-beta-9.4)

### mocha 12.0.0-beta-4 breaking changes

mocha 12.0.0-beta-4, released August 31, 2026: 1 breaking change.

- **Behavior changed** `run`  

The run global is removed in favor of setup on globalThis. Update code that calls run to use setup. [github.com](https://github.com/mochajs/mocha/releases/tag/v12.0.0-beta-4)

### mocha 12.0.0-beta-10 breaking changes

mocha 12.0.0-beta-10, released August 31, 2026: 1 breaking change.

- **Behavior changed** `Pending`  

The Pending class now extends Error, which can change how pending tests are detected or instanceof checks behave. [github.com](https://github.com/mochajs/mocha/releases/tag/v12.0.0-beta-10)

### mocha 12.0.0-beta-1 breaking changes

mocha 12.0.0-beta-1, released August 31, 2026: 4 breaking changes.

- **Removed**  

The minimum Node.js version is raised to 20.19.0. Upgrade Node.js before installing this version. [github.com](https://github.com/mochajs/mocha/releases/tag/v12.0.0-beta-1)
- **Removed** `--compilers`  

The --compilers CLI option has been removed; references were cleaned up in this beta. Use alternatives such as require or node loader options instead. [github.com](https://github.com/mochajs/mocha/releases/tag/v12.0.0-beta-1)

And 2 more in this version.

### mocha 11.6.0 breaking changes

mocha 11.6.0, released June 9, 2025: 1 breaking change.

- **Configuration changed**  

The bundled workerpool dependency was upgraded to a new major version; code relying on workerpool's older behavior may need review. [github.com](https://github.com/mochajs/mocha/releases/tag/v11.6.0)

### mocha 11.0.0 breaking changes

mocha 11.0.0, released November 11, 2024: 1 breaking change.

- **Configuration changed**  

The release breaks compatibility by changing the Node.js versions the package declares support for. The notes do not list which versions are dropped, so check the engines field before upgrading. [github.com](https://github.com/mochajs/mocha/releases/tag/v11.0.0)

### mocha 10.5.0 breaking changes

mocha 10.5.0, released June 24, 2024: 1 breaking change.

- **Default changed**  

The two-column list styles were switched to opt-in, so they no longer apply by default. Users who want them must enable them explicitly. [github.com](https://github.com/mochajs/mocha/releases/tag/v10.5.0)

### mocha 10.0.0 breaking changes

mocha 10.0.0, released May 1, 2022: 17 breaking changes.

- **Removed**  

Mocha 10 no longer supports loading through AMD or RequireJS. [github.com](https://github.com/mochajs/mocha/releases/tag/v10.0.0)
- **Removed**  

Mocha 10 no longer supports Internet Explorer 11 in browser use. [github.com](https://github.com/mochajs/mocha/releases/tag/v10.0.0)

And 15 more in this version.

### mocha 9.1.0 breaking changes

mocha 9.1.0, released August 20, 2021: 1 breaking change.

- **Signature changed** `Mocha.Runnable.state`  

Was state?: "failed" | "passed" | undefined; now state?: 'failed' | 'passed' | 'pending' | undefined. [npmjs.com](https://www.npmjs.com/package/mocha/v/9.1.0)

### mocha 9.0.0 breaking changes

mocha 9.0.0, released June 7, 2021: 6 breaking changes.

- **Removed**  

Mocha 9.0.0 no longer supports Node.js 10.x. Upgrade Node.js before using this version. [github.com](https://github.com/mochajs/mocha/releases/tag/v9.0.0)
- **Removed** `utils.lookupFiles`  

The deprecated utils.lookupFiles() function has been removed. Code calling it will fail. [github.com](https://github.com/mochajs/mocha/releases/tag/v9.0.0)

And 4 more in this version.

### mocha 8.4.0 breaking changes

mocha 8.4.0, released May 7, 2021: 1 breaking change.

- **Default changed**  

The release notes say the default file extensions were updated but do not list the new defaults. Check which test files Mocha now picks up. [github.com](https://github.com/mochajs/mocha/releases/tag/v8.4.0)

### mocha 8.1.0 breaking changes

mocha 8.1.0, released July 30, 2020: 96 breaking changes.

- **Signature changed** `"mocha".Context.currentTest`  

Was currentTest?: Test; now currentTest?: Test | undefined. [npmjs.com](https://www.npmjs.com/package/mocha/v/8.1.0)
- **Signature changed** `"mocha".Context.test`  

Was test?: Runnable; now test?: Runnable | undefined. [npmjs.com](https://www.npmjs.com/package/mocha/v/8.1.0)

And 94 more in this version.

### mocha 8.0.0 breaking changes

mocha 8.0.0, released June 10, 2020: 32 breaking changes.

- **Removed**  

Mocha v8 requires Node.js v10.12.0 or newer; users on Node.js v8 must upgrade their runtime. [github.com](https://github.com/mochajs/mocha/releases/tag/v8.0.0)
- **Removed** `--require`  

Node.js v13.x is end-of-life and no longer supported. [github.com](https://github.com/mochajs/mocha/releases/tag/v8.0.0)

And 30 more in this version.

### mocha 7.0.0 breaking changes

mocha 7.0.0, released January 4, 2020: 11 breaking changes.

- **Removed**  

Mocha 7.0.0 no longer supports Node.js 6.x. Stay on Mocha 6 or upgrade Node.js before upgrading. [github.com](https://github.com/mochajs/mocha/releases/tag/v7.0.0)
- **Removed** `--debug`  

The Node.js debug flag --debug is removed from the Mocha command line. [github.com](https://github.com/mochajs/mocha/releases/tag/v7.0.0)

And 9 more in this version.

### mocha 6.2.1 breaking changes

mocha 6.2.1, released September 29, 2019: 1 breaking change.

- **Removed** `extraGlobals`  

extraGlobals() was removed in this patch release. Code that calls it must stop doing so. [github.com](https://github.com/mochajs/mocha/releases/tag/v6.2.1)

### mocha 6.2.0 breaking changes

mocha 6.2.0, released July 18, 2019: 1 breaking change.

- **Renamed** `--exclude`  

The --exclude option was renamed to --ignore. --exclude still works as an alias, but new code should use --ignore. [github.com](https://github.com/mochajs/mocha/releases/tag/v6.2.0)

### mocha 6.0.0 breaking changes

mocha 6.0.0, released February 18, 2019: 13 breaking changes.

- **Removed**  

Mocha 6 no longer supports Node.js 4.x, so users on that runtime must upgrade Node.js before using it. [github.com](https://github.com/mochajs/mocha/releases/tag/v6.0.0)
- **Removed** `--compilers`  

Using --compilers now makes Mocha fail with a link to more information. Use require hooks instead. [github.com](https://github.com/mochajs/mocha/releases/tag/v6.0.0)

And 11 more in this version.

### mocha 5.2.0 breaking changes

mocha 5.2.0, released May 18, 2018: 109 breaking changes.

- **Signature changed** `"mocha".after`  

Was function after(callback: (this: IHookCallbackContext, done: MochaDone) => PromiseLike\<any> | void): void function after(description: string, callback: (this: IHookCallbackContext, done: MochaDone) => PromiseLike\<any> | void): void; now... [npmjs.com](https://www.npmjs.com/package/mocha/v/5.2.0)
- **Signature changed** `"mocha".afterEach`  

Was function afterEach(callback: (this: IBeforeAndAfterContext, done: MochaDone) => PromiseLike\<any> | void): void function afterEach(description: string, callback: (this: IBeforeAndAfterContext, done: MochaDone) => PromiseLike\<any> |... [npmjs.com](https://www.npmjs.com/package/mocha/v/5.2.0)

And 107 more in this version.

### mocha 5.1.0 breaking changes

mocha 5.1.0, released April 12, 2018: 2 breaking changes.

- **Signature changed** `"mocha".IRunner`  

Was interface IRunner; now interface IRunner extends NodeJS.EventEmitter. [npmjs.com](https://www.npmjs.com/package/mocha/v/5.1.0)
- **Signature changed** `Mocha.IRunner`  

Was interface IRunner; now interface IRunner extends NodeJS.EventEmitter. [npmjs.com](https://www.npmjs.com/package/mocha/v/5.1.0)

### mocha 5.0.2 breaking changes

mocha 5.0.2, released March 6, 2018: 2 breaking changes.

- **Behavior changed**  

Mocha now reports asynchronous errors thrown after a test calls done() instead of silently passing it, so tests that previously passed may now fail and exit with a nonzero code. [github.com](https://github.com/mochajs/mocha/releases/tag/v5.0.2)
- **Behavior changed** `Runner`  

When such a test is encountered, the Runner emits 'end' twice, so external reporters listening with runner.on('end') may need to switch to runner.once('end'). [github.com](https://github.com/mochajs/mocha/releases/tag/v5.0.2)

### mocha 5.0.0 breaking changes

mocha 5.0.0, released January 18, 2018: 1 breaking change.

- **Removed**  

Mocha no longer tests against or fixes issues for IE9 and IE10. Code that consumes the userland buffer module in those browsers may be affected. [github.com](https://github.com/mochajs/mocha/releases/tag/v5.0.0)

### mocha 4.1.0 breaking changes

mocha 4.1.0, released December 29, 2017: 1 breaking change.

- **Behavior changed**  

Calling a setter in Mocha's API with no arguments now returns the current value instead of setting it. Code that calls a setter with no arguments on purpose should be checked. [github.com](https://github.com/mochajs/mocha/releases/tag/v4.1.0)

### mocha 4.0.0 breaking changes

mocha 4.0.0, released October 3, 2017: 5 breaking changes.

- **Removed**  

Mocha 4.0.0 no longer supports non-ES5-compliant browsers. Code running Mocha in these browsers must stay on an older version. [github.com](https://github.com/mochajs/mocha/releases/tag/v4.0.0)
- **Removed**  

Mocha 4.0.0 no longer supports these unmaintained Node.js versions. Stay on Mocha 3.x or upgrade Node.js before upgrading. [github.com](https://github.com/mochajs/mocha/releases/tag/v4.0.0)

And 3 more in this version.

### mocha 3.1.0 breaking changes

mocha 3.1.0, released September 27, 2016: 1 breaking change.

- **Behavior changed**  

When SIGINT is received, mocha now exits with code 130, and exit codes can no longer roll over at 256. Scripts checking exit codes may need updating. [github.com](https://github.com/mochajs/mocha/releases/tag/v3.1.0)

### mocha 3.0.2 breaking changes

mocha 3.0.2, released August 8, 2016: 2 breaking changes.

- **Removed** `html-cov`  

The html-cov reporter is no longer referenced by the CLI, so using it with --reporter will no longer work. [github.com](https://github.com/mochajs/mocha/blob/v3.0.2/CHANGELOG.md)
- **Removed** `json-cov`  

The json-cov reporter is no longer referenced by the CLI, so using it with --reporter will no longer work. [github.com](https://github.com/mochajs/mocha/blob/v3.0.2/CHANGELOG.md)

### mocha 3.0.0 breaking changes

mocha 3.0.0, released August 1, 2016: 10 breaking changes.

- **Removed**  

Mocha no longer runs on Node.js v0.8, so users on that runtime must upgrade Node.js before using this version. [github.com](https://github.com/mochajs/mocha/blob/v3.0.0/CHANGELOG.md)
- **Removed**  

Mocha no longer supports the component package, so projects relying on it must find another option. [github.com](https://github.com/mochajs/mocha/blob/v3.0.0/CHANGELOG.md)

And 8 more in this version.

### mocha 2.0.0 breaking changes

mocha 2.0.0, released October 22, 2014: 1 breaking change.

- **Removed**  

Mocha 2.0.0 no longer supports node 0.6.x and 0.4.x; upgrade the Node.js runtime before using this version. [github.com](https://github.com/mochajs/mocha/blob/2.0.0/History.md)

### mocha 0.13.0 breaking changes

mocha 0.13.0, released February 24, 2012: 2 breaking changes.

- **Renamed** `--debug`  

The --debug flag was swapped for debug to match node. Scripts that pass --debug must switch to debug. [github.com](https://github.com/mochajs/mocha/blob/0.13.0/History.md)
- **Behavior changed**  

The json reporter output is now pretty-printed. Code that parses or compares the exact raw output may need updating. [github.com](https://github.com/mochajs/mocha/blob/0.13.0/History.md)

### mocha 0.8.0 breaking changes

mocha 0.8.0, released December 28, 2011: 1 breaking change.

- **Behavior changed**  

Calling done() with a value that is not an Error now fails the test. Code that passes other values to done() to signal success must be changed. [github.com](https://github.com/mochajs/mocha/blob/0.8.0/History.md)

## Check your code

These are the changes. To see which of them reach your code, [scan a public repository](https://since.dev/scan.md), or have your coding agent call `check_code` with your manifest or lockfile over [MCP](https://since.dev/docs.md#mcp). [The API](https://since.dev/docs.md#api) reads every change in every version. A fix pull request opens for the changes that reach a connected repository. Nothing merges or deploys.

## Put your code on continuous maintenance.

Scan a public repository now, or give your agent one line.

[Scan a repository](https://since.dev/scan.md). Any public GitHub repository. No sign-in.

### Tell your agent what changed since it was trained.

`claude mcp add --transport http since https://api.since.dev/mcp`

[Get an API key](https://app.since.dev/login?mode=signup)

Codex, Cursor and any MCP client use https://api.since.dev/mcp.

---

Every page on this site as Markdown: https://since.dev/sitemap.md. For agents: https://since.dev/llms.txt.
