unstale

npm / mocha

mocha

What changed in mocha 11 to 12, from its official release notes, upgrade guides and advisories. Sources checked 2026-10-17.

1 breaking2 new APIs and options15 fixes and other

See which of these apply to your code, ranked, in your agent:

npx @unstale/cli init

@unstale/cli 0.1.1 on npm

mocha 1214 changes

Breaking changes 1

  • Nested tests now fail when a beforeEach hook fails.

    12.0.2release notes

New APIs and options 1

  • Supports one-character aliases using the --X form.

    12.0.3release notes

Fixes and other changes 12

  • Shows the require() error for unsupported directory imports.

    12.0.3release notes

  • Watch mode keeps running when the last test file is removed.

    12.0.3release notes

  • The detection window for --exit is widened.

    12.0.2release notes

  • Mocha works around ERR_PACKAGE_PATH_NOT_EXPORTED using find-up-simple.

    12.0.2release notes

  • The spec file path is propagated when a parallel worker dies.

    12.0.2release notes

  • A reporter option specified on the CLI takes precedence over the value in the config file.

    12.0.2release notes

  • Existing directories are watched so the first run starts armed.

    12.0.2release notes

  • Unknown configuration values are no longer treated as test specs.

    12.0.1release notes

  • Only positional arguments that are entirely numeric are rejected.

    12.0.1release notes

  • Embedded stacks render once after splitting err.stack at the trailing frame block.

    12.0.1release notes

  • Fixes parsing of negative numbers and quoted strings.

    12.0.0release notes

  • Preserves FIFO descriptors when respawning.

    12.0.0release notes

mocha 114 changes

New APIs and options 1

  • Adds an option to report skipped tests as failed.

    11.8.0release notes

Fixes and other changes 3

  • Mocha now surfaces ts-node compile errors so developers can see failures when compiling tests.

    11.7.7release notes

  • Fixed describe().timeout() so it works.

    11.7.6release notes

  • Mocha swallows more require errors from TypeScript files.

    11.7.5release notes