mocha breaking changes
Updated December 4, 2026
On this page
Latest version 12.0.3, released October 1, 2026. Source repository
Its 12.0.0-beta-1 release requires Node.js 20.19.0 or later. Node.js end of life dates.
- From 11.6.0 to 12.0.2: 16 breaking changes in 10 versions.
- From 0.8.0 to 12.0.2: 334 breaking changes in 34 versions.
mocha 12.0.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 - 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
mocha 12.0.0-rc.4 breaking changes
- 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
mocha 12.0.0-rc.3 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 - 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
mocha 12.0.0-rc.2 breaking changes
- 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
mocha 12.0.0-rc.1 breaking changes
- 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
mocha 12.0.0-beta-9.5 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 - Behavior changed
lookupFiles
lookupFiles() returns an array of strings for direct file paths, which may change how existing callers handle the result. github.com
Older versions
29 older versions, each with its first changes. Sign up to see every change
Show 29 older versions
mocha 12.0.0-beta-9.4 breaking changes
- Removed
Unused legacy functions in errors.js were removed as a breaking change; code importing them must stop using them. github.com
mocha 12.0.0-beta-4 breaking changes
- Behavior changed
run
The run global is removed in favor of setup on globalThis. Update code that calls run to use setup. github.com
mocha 12.0.0-beta-10 breaking changes
- Behavior changed
Pending
The Pending class now extends Error, which can change how pending tests are detected or instanceof checks behave. github.com
mocha 12.0.0-beta-1 breaking changes
- Removed
The minimum Node.js version is raised to 20.19.0. Upgrade Node.js before installing this version. github.com - 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
And 2 more in this version.
mocha 11.6.0 breaking changes
- 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
mocha 11.0.0 breaking changes
- 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
mocha 10.5.0 breaking changes
- 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
mocha 10.0.0 breaking changes
- Removed
Mocha 10 no longer supports loading through AMD or RequireJS. github.com - Removed
Mocha 10 no longer supports Internet Explorer 11 in browser use. github.com
And 15 more in this version.
mocha 9.1.0 breaking changes
- Signature changed
Mocha.Runnable.state
Was state?: "failed" | "passed" | undefined; now state?: 'failed' | 'passed' | 'pending' | undefined. npmjs.com
mocha 9.0.0 breaking changes
- Removed
Mocha 9.0.0 no longer supports Node.js 10.x. Upgrade Node.js before using this version. github.com - Removed
utils.lookupFiles
The deprecated utils.lookupFiles() function has been removed. Code calling it will fail. github.com
And 4 more in this version.
mocha 8.4.0 breaking changes
- 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
mocha 8.1.0 breaking changes
- Signature changed
"mocha".Context.currentTest
Was currentTest?: Test; now currentTest?: Test | undefined. npmjs.com - Signature changed
"mocha".Context.test
Was test?: Runnable; now test?: Runnable | undefined. npmjs.com
And 94 more in this version.
mocha 8.0.0 breaking changes
- Removed
Mocha v8 requires Node.js v10.12.0 or newer; users on Node.js v8 must upgrade their runtime. github.com - Removed
--require
Node.js v13.x is end-of-life and no longer supported. github.com
And 30 more in this version.
mocha 7.0.0 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 - Removed
--debug
The Node.js debug flag --debug is removed from the Mocha command line. github.com
And 9 more in this version.
mocha 6.2.1 breaking changes
- Removed
extraGlobals
extraGlobals() was removed in this patch release. Code that calls it must stop doing so. github.com
mocha 6.2.0 breaking changes
- Renamed
--exclude
The --exclude option was renamed to --ignore. --exclude still works as an alias, but new code should use --ignore. github.com
mocha 6.0.0 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 - Removed
--compilers
Using --compilers now makes Mocha fail with a link to more information. Use require hooks instead. github.com
And 11 more in this version.
mocha 5.2.0 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 - 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
And 107 more in this version.
mocha 5.1.0 breaking changes
- Signature changed
"mocha".IRunner
Was interface IRunner; now interface IRunner extends NodeJS.EventEmitter. npmjs.com - Signature changed
Mocha.IRunner
Was interface IRunner; now interface IRunner extends NodeJS.EventEmitter. npmjs.com
mocha 5.0.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 - 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
mocha 5.0.0 breaking changes
- 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
mocha 4.1.0 breaking changes
- 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
mocha 4.0.0 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 - 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
And 3 more in this version.
mocha 3.1.0 breaking changes
- 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
mocha 3.0.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 - 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
mocha 3.0.0 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 - Removed
Mocha no longer supports the component package, so projects relying on it must find another option. github.com
And 8 more in this version.
mocha 2.0.0 breaking changes
- 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
mocha 0.13.0 breaking changes
- Renamed
--debug
The --debug flag was swapped for debug to match node. Scripts that pass --debug must switch to debug. github.com - Behavior changed
The json reporter output is now pretty-printed. Code that parses or compares the exact raw output may need updating. github.com
mocha 0.8.0 breaking changes
- 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
Check your code
These are the changes. To see which of them reach your code, scan a public repository, or have your coding agent call check_code with your manifest or lockfile over MCP. The 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.
See how out of date your code is.
Tell your agent what changed since it was trained.
claude mcp add --transport http since https://api.since.dev/mcpCodex, Cursor and any MCP client use https://api.since.dev/mcp.