# What changed in mocha

> 18 changes in mocha 11 to 12 from its official release notes, upgrade guides and advisories: 1 breaking, 2 new APIs and options. Each one cited. Sources checked 2026-10-17. HTML: https://unstale.sh/npm/mocha/

To see which of these apply to a repository, run `npx @unstale/cli init` in it.

## mocha 12

### Breaking changes

- Nested tests now fail when a beforeEach hook fails. (12.0.2) — [release notes](https://github.com/mochajs/mocha/releases/tag/v12.0.2)

### New APIs and options

- Supports one-character aliases using the --X form. (12.0.3) — [release notes](https://github.com/mochajs/mocha/releases/tag/v12.0.3)

### Fixes and other changes

- Shows the require() error for unsupported directory imports. (12.0.3) — [release notes](https://github.com/mochajs/mocha/releases/tag/v12.0.3)
- Watch mode keeps running when the last test file is removed. (12.0.3) — [release notes](https://github.com/mochajs/mocha/releases/tag/v12.0.3)
- The detection window for --exit is widened. (12.0.2) — [release notes](https://github.com/mochajs/mocha/releases/tag/v12.0.2)
- Mocha works around ERR_PACKAGE_PATH_NOT_EXPORTED using find-up-simple. (12.0.2) — [release notes](https://github.com/mochajs/mocha/releases/tag/v12.0.2)
- The spec file path is propagated when a parallel worker dies. (12.0.2) — [release notes](https://github.com/mochajs/mocha/releases/tag/v12.0.2)
- A reporter option specified on the CLI takes precedence over the value in the config file. (12.0.2) — [release notes](https://github.com/mochajs/mocha/releases/tag/v12.0.2)
- Existing directories are watched so the first run starts armed. (12.0.2) — [release notes](https://github.com/mochajs/mocha/releases/tag/v12.0.2)
- Unknown configuration values are no longer treated as test specs. (12.0.1) — [release notes](https://github.com/mochajs/mocha/releases/tag/v12.0.1)
- Only positional arguments that are entirely numeric are rejected. (12.0.1) — [release notes](https://github.com/mochajs/mocha/releases/tag/v12.0.1)
- Embedded stacks render once after splitting err.stack at the trailing frame block. (12.0.1) — [release notes](https://github.com/mochajs/mocha/releases/tag/v12.0.1)
- Fixes parsing of negative numbers and quoted strings. (12.0.0) — [release notes](https://github.com/mochajs/mocha/releases/tag/v12.0.0)
- Preserves FIFO descriptors when respawning. (12.0.0) — [release notes](https://github.com/mochajs/mocha/releases/tag/v12.0.0)

## mocha 11

### New APIs and options

- Adds an option to report skipped tests as failed. (11.8.0) — [release notes](https://github.com/mochajs/mocha/releases/tag/v11.8.0)

### Fixes and other changes

- Mocha now surfaces ts-node compile errors so developers can see failures when compiling tests. (11.7.7) — [release notes](https://github.com/mochajs/mocha/releases/tag/v11.7.7)
- Fixed describe().timeout() so it works. (11.7.6) — [release notes](https://github.com/mochajs/mocha/releases/tag/v11.7.6)
- Mocha swallows more require errors from TypeScript files. (11.7.5) — [release notes](https://github.com/mochajs/mocha/releases/tag/v11.7.5)
