unstale

npm / jest

jest

What changed in jest 30, from its official release notes, upgrade guides and advisories. Sources checked 2026-10-17.

6 breaking1 security6 deprecations26 new APIs and options6 performance22 behavior and defaults2 tooling44 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

jest 30113 changes

Breaking changes 6

  • Module mocks instantiated inside an isolated block are now scoped to that block instead of outliving it.

    30.5.0release notes

  • Calls to module.register() and module.registerHooks() inside a test now throw an actionable error because their hooks cannot affect sandboxed requires.

    30.5.0release notes

  • Watched files now match full extensions, so moduleFileExtensions: ['js'] no longer accepts foo.mjs.

    30.5.0release notes

  • ESM requiring, CJS/ESM interop and related error behavior are brought closer to Node, including live-binding facades and Node-compatible errors for cycles and top-level await.

    30.5.0release notes

  • When importing CJS from ESM, module.exports is always the ESM default; __esModule unwrapping is no longer applied, aligning behavior with Node.

    30.4.1release notes

  • The global coverage threshold now applies to unmatched pattern files in addition to glob and path thresholds.

    30.4.0release notes

Security 1

  • The aliases are moved into the @jest scope so unrelated packages published under the alias names cannot shadow them.

    30.5.0release notes

Deprecations 6

  • A project config containing this global-only option now warns instead of silently ignoring it.

    30.5.1release notes

  • A project config containing this option now warns instead of dropping it without notice.

    30.5.1release notes

  • A project config containing this global-only option now warns instead of silently ignoring it.

    30.5.1release notes

  • A project config containing this global-only option now warns instead of silently ignoring it.

    30.5.1release notes

  • A project config containing this global-only option now warns instead of silently ignoring it.

    30.5.1release notes

  • getCallsite is deprecated in favor of SourceMapSupport#getCallsite.

    30.5.0release notes

New APIs and options 26

  • The @jest/expect-utils package now exports the AsymmetricMatcher type, which was previously private to expect.

    30.5.0release notes

  • CommonJS exports are available under the module.exports named export when imported from ESM, matching Node 23+.

    30.5.0release notes

  • The @jest/expect-utils package now exports the FunctionParameters type, which was previously private to expect.

    30.5.0release notes

  • Snapshot failure details expose the path to the external .snap file for custom reporters.

    30.5.0release notes

  • Assertion results now include retry messages, with nested causes and AggregateError sections rendered with code frames.

    30.5.0release notes

  • Set entireDescribe: true to retry a whole describe block, rerunning its hooks, child tests and nested describes on each attempt.

    30.5.0release notes

  • Circus run results now include detailed unhandled errors, including cause chains and AggregateError entries with code frames.

    30.5.0release notes

  • Mock functions can configure chained mock behavior for specific argument lists, including asymmetric matchers; unmatched calls fall through to the base mock.

    30.5.0release notes

  • Selected tests in --collectTests output have a new flag indicating whether they would run.

    30.5.0release notes

  • Custom runner configuration options can be specified using the tuple format ['runner-path', {options}].

    30.4.1release notes

  • Resolver callers can detect when a user-configured resolver only exports an async hook.

    30.4.0release notes

  • ScriptTransformer callers can choose the synchronous or asynchronous transform path.

    30.4.0release notes

  • ModuleMocker can clear every mock function exposed on a scope object.

    30.4.0release notes

  • Discover and list tests without executing them.

    30.4.0release notes

  • Exports the GlobalConfig TypeScript type.

    30.4.0release notes

  • Adds an error-checking helper to jest-util.

    30.4.0release notes

  • Accepts Temporal.Duration values.

    30.4.0release notes

  • Accepts Temporal.Duration values.

    30.4.0release notes

  • Use jest.config.mts as a valid Jest configuration file.

    30.4.0release notes

  • Exports the ProjectConfig TypeScript type.

    30.4.0release notes

  • Set silent per project; the project-level value overrides the global value for that project's tests.

    30.4.0release notes

  • Set verbose per project; the project-level value overrides the global value for that project's tests.

    30.4.0release notes

  • Control how long workers are given to exit before being force-killed.

    30.4.0release notes

  • Adds a helper for type-safe Jest configuration.

    30.3.0release notes

  • Adds a helper for type-safe Jest configuration.

    30.3.0release notes

  • Adds a method to configure how timers advance.

    30.3.0release notes

Performance 6

  • Warm resolution cost is cut by reusing resolver factories and cached strings, and by avoiding Error construction for swallowed misses.

    30.5.0release notes

  • babel, semver, and synckit are loaded lazily, avoiding loading about 200 modules when requiring the package unless writing inline snapshots needs them.

    30.5.0release notes

  • Cached metadata is reused for files whose haste name is a known duplicate, avoiding repeated reads and parsing on startup.

    30.5.0release notes

  • Repeated work on the resolution hot path is reduced through memoization and skipped preparation when no moduleNameMapper is configured.

    30.5.0release notes

  • Per-require overhead is reduced by skipping unnecessary module ID resolution and manual-mock probes, sharing a require.cache proxy, and caching empty files.

    30.5.0release notes

  • The watchman socket path is cached and the version probe is replaced with get-sockname, so warm runs spawn no watchman processes.

    30.5.0release notes

Behavior and default changes 22

  • When no transformer claims a .ts, .mts or .cts file, Jest strips its TypeScript types with Node.

    30.5.2release notes

  • A project config containing this global-only option now warns instead of silently ignoring it.

    30.5.1release notes

  • A project config containing this option now warns instead of dropping it without notice.

    30.5.1release notes

  • Inner errors and nested causes render with code frames and indentation, and are included in JSON output, retry reasons and reporter annotations.

    30.5.0release notes

  • Collection expands test.each and describe.each cases, reports per-status counts and a summary line, and accounts for selected tests that would run.

    30.5.0release notes

  • When multiple --projects are specified, --config is now used for the global config.

    30.5.0release notes

  • On Node 24.9+, automocking and manual __mocks__ files apply to synchronously evaluable ESM graphs, including static imports, dynamic imports and require().

    30.5.0release notes

  • Jest sets import.meta.main to true in the test file and false in modules it loads, matching Node 24+.

    30.5.0release notes

  • The default resolver now honors Node's --preserve-symlinks option and NODE_PRESERVE_SYMLINKS environment variable.

    30.5.0release notes

  • The parameter type now accepts object rather than only Record<string, unknown>, allowing class instances.

    30.5.0release notes

  • The parameter type now accepts object rather than only Record<string, unknown>, allowing class instances.

    30.5.0release notes

  • A custom resolver can now be written as an ES module.

    30.5.0release notes

  • Improves interop with __esModule/Babel default unwrapping, broader named-export coverage, and a shared CJS singleton across importers.

    30.4.0release notes

  • JSON failureMessages output now includes Error.cause.

    30.4.0release notes

  • Jest validates TC39 import attributes on ESM imports.

    30.4.0release notes

  • Accepts Temporal.Instant and Temporal.ZonedDateTime values.

    30.4.0release notes

  • Loads .js files with ESM syntax as native ESM even without a type:module marker.

    30.4.0release notes

  • Known global-only options now receive the message “is not supported in an individual project configuration” instead of “probably a typing mistake.”

    30.4.0release notes

  • Supports requiring ES modules on Node v24.9+.

    30.4.0release notes

  • On Node v24.9+, the .js-with-ESM-syntax fallback uses require(esm) when the CJS parser rejects ESM syntax.

    30.4.0release notes

  • On Node versions that support it, ES modules without top-level await use synchronous evaluate(); Jest prefers the synchronous transform path when a sync transformer is configured.

    30.4.0release notes

  • The now option accepts Temporal.Instant and Temporal.ZonedDateTime values.

    30.4.0release notes

Tooling 2

Fixes and other changes 44

  • The command reports the released version instead of the previous version.

    30.5.2release notes

  • Absolute Windows paths in sources and sourceRoot resolve as absolute paths instead of being appended to the transformed file's directory.

    30.5.2release notes

  • Cache keys report the released version instead of the previous version.

    30.5.2release notes

  • Table row keys are escaped before building the interpolation RegExp, so special characters in column names no longer cause errors or match incorrectly.

    30.5.2release notes

  • The config that supplies the global config no longer warns about global-only options.

    30.5.1release notes

  • Patterns are matched against the module specifier as written again.

    30.5.1release notes

  • Package imports specifiers such as #dep resolve under ESM again.

    30.5.1release notes

  • ES modules are keyed by full URL, so query and fragment suffixes create distinct module instances and appear in import.meta.url, matching Node.

    30.5.0release notes

  • The option is now honored when formatting node:assert failures instead of always collapsing the diff.

    30.5.0release notes

  • This config entry is now recognized by ValidConfig and no longer triggers a spurious unknown-option warning.

    30.5.0release notes

  • When given an unresolvable module with {virtual: true}, the error now points at the virtual option.

    30.5.0release notes

  • JSON output now serializes bigint values in literal form, such as 4n, instead of failing the run.

    30.5.0release notes

  • Return-type inference now considers all overloads, preserving Promise-returning overloads even when a later overload returns a non-Promise.

    30.5.0release notes

  • Return-type inference now considers all overloads, preserving Promise-returning overloads even when a later overload returns a non-Promise.

    30.5.0release notes

  • The resolver now handles the module-sync export condition so packages can resolve the same ESM entry point for require() as Node.

    30.5.0release notes

  • Jest now populates module.children with the modules a file loads, matching Node.

    30.5.0release notes

  • Mappings now apply consistently to both bare and node:-prefixed spellings of core module specifiers.

    30.5.0release notes

  • This config entry is now recognized by ValidConfig and no longer triggers a spurious unknown-option warning.

    30.5.0release notes

  • This config entry is now recognized by ValidConfig and no longer triggers a spurious unknown-option warning.

    30.5.0release notes

  • The test file itself now has a non-null require.main.

    30.5.0release notes

  • Injected globals are now bound to the correct values when injectGlobals is false.

    30.5.0release notes

  • Generator test bodies now receive the shared test context, so this behaves as it does in a regular test function.

    30.5.0release notes

  • Mocks apply when the mocked file is directly required, async factories run once and rejected factories fail the import instead of crashing the worker, and mocks remain scoped to isolated modules.

    30.5.0release notes

  • Fixes named imports from CJS modules whose module.exports is a function with own-property exports.

    30.4.2release notes

  • Prevents jest-circus from crashing when asyncError is undefined for non-Error throws.

    30.4.0release notes

  • Project configurations can set collectCoverage without a validation warning.

    30.4.0release notes

  • Fixes deadlocks and double-evaluation during concurrent ESM and wasm imports.

    30.4.0release notes

  • Project configurations can set coverageProvider without a validation warning.

    30.4.0release notes

  • Fake timers convert Date values to milliseconds before passing them to @sinonjs/fake-timers.

    30.4.0release notes

  • Test-file imports resolve expect and @jest/expect from the internal module registry so they share the global expect's JestAssertionError.

    30.4.0release notes

  • Restores the missing error when import() is called after the Jest environment has been torn down.

    30.4.0release notes

  • Fixes the warning on Node 25+.

    30.4.0release notes

  • Applied when resolving modules with require.resolve() and the paths option.

    30.4.0release notes

  • Fixes Windows preset path resolution when the preset uses subpath exports.

    30.4.0release notes

  • Fixes incorrect code coverage in coverage reports when using the projects config option.

    30.4.0release notes

  • pretty-format supports React 19 so snapshots of React components work properly.

    30.4.0release notes

  • Fixes errors when require() is called after the Jest environment has been torn down.

    30.4.0release notes

  • Subset matching no longer throws when encountering exotic iterables.

    30.4.0release notes

  • No longer fails on structuredClone results due to cross-realm constructor mismatch.

    30.4.0release notes

  • Virtual registrations are now respected in ESM.

    30.4.0release notes

  • Fixes dynamic import when the Node option --experimental-vm-modules is specified.

    30.3.0release notes

  • Console output is now displayed for the GHA reporter when silent: false.

    30.3.0release notes

  • Preserves CLI coverage output when using --json with --outputFile.

    30.3.0release notes

  • Failed tests due to compilation errors are re-executed when --onlyFailures is used.

    30.3.0release notes