chore(deps): update jest monorepo to v30 (major) #112

Open
renovate-bot wants to merge 1 commit from renovate/major-jest-monorepo into master
Member

This PR contains the following updates:

Package Change Age Confidence
@types/jest (source) ^29.5.6 -> ^30.0.0 age confidence
jest (source) ^29.7.0 -> ^30.0.0 age confidence

Release Notes

jestjs/jest (jest)

v30.5.1

Compare Source

Fixes
  • [jest-config] Don't warn about global-only options in the config that supplies the global config - the root config a project resolves to, or the first entry of --projects when no root config is passed (#​16411)
  • [jest-config, jest-types] Stop accepting reporters, coverageReporters, workerIdleMemoryLimit, cwd and runnerOptions in a project config - they were silently ignored, and now warn like the other global-only options (#​16411)
  • [jest-config, jest-validate] Warn about maxWorkers and coverageThreshold in a project config instead of dropping them without a word (#​16411)
  • [jest-resolve] Match moduleNameMapper patterns against the specifier as written again (reverting #​16390) (#​16417)
  • [jest-runtime] Resolve package imports specifiers like #dep under ESM again (#​16413)
Chore & Maintenance
  • [jest-util] Name the testEnvironmentOptions.globalsCleanup option and link the docs from the JEST-01 deprecation warning, and document the option's modes (#​16404)

v30.5.0

Compare Source

Features
  • [@jest/expect-utils, jest-mock] Add mockFn.whenCalledWith(...args) for configuring return values per argument list, with first-class asymmetric-matcher support (#​16053)
  • [@jest/expect-utils] Export AsymmetricMatcher and FunctionParameters types (previously private to expect) (#​16053)
  • [jest-circus, jest-core, jest-jasmine2, jest-test-result, jest-types] --collectTests now expands test.each/describe.each cases and reports per-status counts (skipped/todo via the new wouldRun flag for selected tests) plus a summary line that match a real run, including under --testNamePattern and .only/fdescribe focus on both the circus and jasmine2 runners (#​16259)
  • [jest-circus, jest-environment, jest-runtime, jest-types] Add describe-level retries via jest.retryTimes(..., {entireDescribe: true}) (#​16322)
  • [jest-circus, jest-message-util, jest-reporters, jest-types] Add retryMessages to AssertionResult and export formatErrorStack, so the retry log renders nested cause and AggregateError sections with code frames instead of serialized [cause]:/[errors]: markers (#​16316)
  • [jest-circus, jest-types] Add unhandledErrorsDetailed to Circus.RunResult, so an unhandled rejection reports its cause chain and AggregateError entries with code frames instead of a pre-serialized stack (#​16316)
  • [jest-haste-map] Replace NodeWatcher and FSEventsWatcher with @parcel/watcher for the non-watchman watch path (#​16188)
  • [jest-resolve] Bump unrs-resolver to 1.12.1, remove jest-pnp-resolver and unnecessary checks (#​15721)
  • [jest-resolve] Honor Node's --preserve-symlinks / NODE_PRESERVE_SYMLINKS in the default resolver by passing symlinks: false to unrs-resolver (#​16260)
  • [jest-runtime] Apply automocking and manual __mocks__ files to synchronously evaluable ESM graphs on Node 24.9+ - static imports, dynamic import() and require() of an ESM file now generate an automock from the real module's namespace instead of failing with "Attempting to import a mock without a factory". Graphs that need async evaluation (top-level await) or an async-only resolver or transformer still throw (#​16391)
  • [jest-runtime] Route process.getBuiltinModule through the sandbox, so it returns the sandbox process and the hooked node:module instead of the host's (#​16391)
  • [jest-runtime] Throw an actionable error from module.register() and module.registerHooks() inside a test - the hooks attached to the loader running Jest itself, never saw the sandboxed requires they were meant for, and stayed registered for every later test file in the worker (#​16391)
  • [jest-runtime] Surface resolution and import-attribute errors in an ESM graph before executing any of its CJS dependencies on Node 24.9+, matching Node's run-nothing-on-a-broken-graph behavior; the legacy loader on older versions keeps its linking-time execution order (#​16391)
  • [jest-runtime] Throw ERR_SOURCE_PHASE_NOT_DEFINED with an actionable message for import source and import.source(), instead of failing at instantiation with V8's bare "Source phase import object is not defined" (#​16391)
  • [jest-runtime] Emit the JSON-without-import-attribute deprecation warning once per test file instead of once per worker, so it is no longer silently swallowed for every file after the first (#​16391)
  • [jest-runtime] Set import.meta.main to true in the test file and false in every module it loads, matching Node 24+ (#​16367)
  • [jest-runtime] Resolve the module-sync export condition, so a package that exposes its ESM entry point for require() loads the same file Node would (#​16336)
  • [jest-snapshot] Add external snapshot paths to custom reporter failure details (#​16374)
Fixes
  • [jest-console, jest-reporters] CustomConsole now buffers console output so TestResult.console is populated for reporters when verbose is enabled, while GitHubActionsReporter avoids replaying buffered output in verbose mode (#​16155)
  • [expect, jest-message-util, jest-pattern, jest-regex-util, jest-util] Revert node: protocol imports to restore webpack/browser-bundle compatibility (#​16167)
  • [expect] Widen toMatchObject and objectContaining parameter type from Record<string, unknown> to object so class instances are accepted (#​16196)
  • [jest-circus] Call a generator test body with the shared test context, so this matches what a regular test function receives (#​16347)
  • [jest-circus] Capture the error listeners of the parent process instead of the in-sandbox process, so listeners registered before the test file survive teardown and sandbox listeners no longer leak onto the parent (#​16347)
  • [jest-circus] Clear currentlyRunningTest after skipped and todo tests (#​16342)
  • [jest-circus] Prevent late done() callbacks from affecting later test or hook invocations (#​16343)
  • [jest-circus, jest-jasmine2] Honor --expand when formatting node:assert failures, instead of always collapsing the diff (#​16347)
  • [jest-circus, jest-jasmine2, jest-message-util] Serialize the inner errors of an AggregateError into failureMessages, retryReasons and unhandledErrors, so --json output and reporter annotations include them (#​16316)
  • [jest-circus, jest-snapshot] Keep snapshot state and counts correct when a test retries (#​16344)
  • [@jest/create-cache-key-function] Include the caller support flags in the generated key, so a transformer that emits ESM or CJS based on them no longer shares one cache entry between the two (#​16331)
  • [@jest/create-cache-key-function] Include the stringified project config in the generated key, so editing a transformer's own settings invalidates what it cached (#​16331)
  • [@jest/transform] Include the caller support flags in a transform's cache key, so a file transformed both as ESM and as CJS no longer serves one shape's output for the other (#​16331)
  • [jest-config] Add missing findRelatedTests, outputFile, and replname entries to ValidConfig so they no longer trigger spurious "Unknown option" warnings (#​16224)
  • [jest-config] Use --config for the global config when multiple --projects are specified (#​16273)
  • [jest-core] Serialize bigint values in --json and --outputFile output as their literal form (4n), instead of failing the run with TypeError: Do not know how to serialize a BigInt (#​16338)
  • [jest-core] Do not report a CustomGC async resource (used by N-API addons such as napi-rs for per-isolate GC bookkeeping) as an open handle, since it is napi_unref'd by the addon and can never keep the event loop alive (#​16379)
  • [jest-each] Keep a $&, $`, $' or $$ inside a %p param value out of the replacement, so the title shows the value instead of the text around it (#​16338)
  • [jest-each] Interpolate a bigint into a %j title as its literal form ("4n") at any depth, instead of throwing TypeError: Do not know how to serialize a BigInt while collecting the tests (#​16338)
  • [jest-environment, jest-runtime] Bind sandboxInjectedGlobals to the right values when injectGlobals is false, instead of shifting every one of them by a position (#​16377)
  • [jest-environment-node, jest-util] Only warn about a conflicting globalsCleanup mode when one was explicitly configured, and follow the mode that is actually in effect (#​16323)
  • [jest-environment-node, jest-util] Stop resolving lazy globals when setting up an environment, so Node 26's builtin module globals are no longer loaded (and no longer emit their deprecation warnings) for every test file (#​16324)
  • [jest-haste-map] Keep watch mode alive when an outside process briefly makes a file unreadable on Windows, instead of tearing the watcher down on EPERM (#​16295)
  • [jest-haste-map] Keep indexing when an outside process holds a file open on Windows, instead of failing the whole crawl on EPERM (#​16358)
  • [jest-haste-map] Keep a duplicated manual mock resolving when the file it pointed at is deleted in watch mode (#​16360)
  • [jest-haste-map] Shut the worker farm down when a duplicate manual mock aborts the build under throwOnModuleCollision (#​16354)
  • [jest-haste-map] Attach the watchman client's error listener before the first command, so a watchman failure falls back to the node crawler instead of crashing on an unhandled error event, and always end the client (#​16355)
  • [jest-haste-map] Stop delivering watch events after WatchmanWatcher is closed, and route its warnings through the configured console (#​16355)
  • [jest-haste-map] Restore the nested duplicates index correctly in ModuleMap.fromJSON, so a haste collision reported inside a test worker raises DuplicateHasteCandidatesError instead of a TypeError (#​16353)
  • [jest-haste-map] Match watched files on a full extension, so moduleFileExtensions: ['js'] no longer accepts foo.mjs (#​16352)
  • [jest-haste-map] Delimit the fields that make up the haste map cache key, so two different option sets cannot hash to the same cache file (#​16352)
  • [jest-message-util] Print the inner errors of an AggregateError thrown inside a test (#​16316)
  • [jest-message-util] Indent nested cause and AggregateError sections of a test failure by one level per depth, so the nesting is legible instead of rendering flat (#​16316)
  • [jest-message-util] Color stack traces line by line so blank lines stay blank (#​16316)
  • [jest-message-util] Detect Jest's own frames without assuming the checkout directory's name, and cover @jest/* packages, so stack traces and code frames point at user code (#​16326)
  • [jest-mock] mockResolvedValue / mockRejectedValue now see all overload return types, so a Promise-returning overload survives even when a later overload returns a non-Promise (e.g. pg.Client['end']) (#​16237)
  • [@jest-environment/jsdom-abstract] Make @types/jsdom a peer dependency (#​16166)
  • [jest-mock] Remove the leftover own accessor descriptor when restoring a spyOn of an inherited getter or setter, so the instance keeps reflecting the prototype (#​16226)
  • [jest-resolve] Include extensionsToTreatAsEsm in the shouldLoadAsEsm cache key, so projects with different extension lists don't read each other's answers (#​16369)
  • [jest-resolve] Make getModuleIDAsync build and cache data: URI module IDs the same way as getModuleID (#​16370)
  • [jest-resolve] Keep the node: prefix when resolving a core module asynchronously, so a builtin that only exists prefixed (node:sea, node:sqlite, node:test, node:test/reporters) resolves instead of failing as a missing bare package (#​16388)
  • [jest-resolve] Look up manual mocks for node: protocol specifiers under the unprefixed name they are stored as (#​16388)
  • [jest-resolve] Apply moduleNameMapper consistently to both spellings of core module specifiers (fs vs node:fs) (#​16390)
  • [jest-resolve] Keep virtual and ordinary mock module IDs isolated across test files (#​16296)
  • [jest-resolve] Guard missing require.resolve.paths (#​16052)
  • [jest-resolve, jest-config, jest-runner] Support a user resolver written as an ES module (#​16332)
  • [jest-resolve, jest-runtime] Throw the CJS parse error for ESM syntax in a "type": "commonjs" package or a .cjs file instead of loading it as ESM, matching Node (#​16368)
  • [@jest/source-map] Keep source map sources that name a scheme, such as webpack:///, instead of resolving them into a path that does not exist (#​16327)
  • [@jest/source-map] Look up --testLocationInResults positions at the right column, and keep a mapping to the first column instead of discarding it (#​16327)
  • [@jest/source-map] Warn when a source map cannot be parsed, instead of silently leaving its frames untranslated (#​16327)
  • [jest-runner, @&#8203;jest/source-map] Keep a source-mapped stack for an error thrown after the test environment was torn down (#​16327)
  • [jest-runtime, @&#8203;jest/source-map] Keep source maps past teardown and past the next test file's install, so a stack from a file no earlier stack mentioned still points at the original source (#​16330)
  • [jest-runtime] Report that no coverage was collected when getAllV8CoverageInfoCopy is called after teardown, instead of returning an empty result (#​16385)
  • [jest-runtime] Cache a CJS module's parsed exports before walking its re-exports, so two modules that re-export each other no longer overflow the stack when imported from ESM (#​16363)
  • [jest-runtime] Keep a re-exported ES module's parse failure from marking the re-exporting CommonJS file as ESM, so module.exports = require('./dep.mjs') loads instead of failing with module is not defined (#​16363)
  • [jest-runtime] Scope module mocks instantiated inside jest.isolateModules/isolateModulesAsync to that block, so a mock first imported there no longer outlives it - matching how CommonJS mocks already behave (#​16365)
  • [jest-runtime] Suspend module isolation while generating an automock, so loading the real module to read its shape no longer populates the isolated registry (#​16365)
  • [jest-runtime] Check a cached ES module's status before require() returns it, so a module whose evaluation threw rethrows that error and one left linked by a failed sibling is evaluated instead of returning uninitialized bindings (#​16364)
  • [jest-runtime] Report the original ERR_REQUIRE_ASYNC_MODULE when a require() of a top-level-await graph is retried, instead of a spurious "concurrent import()" error (#​16364)
  • [jest-runtime] Throw the evaluation error when another caller's import() of the same module failed while we awaited it, instead of resolving with the errored module (#​16364)
  • [jest-runtime] Mark the result of require()ing an ES module that has a default export with __esModule: true through a live-binding facade, and serve the same object from require.cache, matching Node (#​16367)
  • [jest-runtime] Provide a CommonJS module's exports under the 'module.exports' named export when imported from ESM, matching Node 23+ (#​16367)
  • [jest-runtime] Give the test file itself a non-null require.main (#​16367)
  • [jest-runtime] Populate module.children with the modules a file loads, matching Node (#​16368)
  • [jest-runtime] Provide import.meta.resolve and import.meta.jest in data: URI modules, accept any-case mediatype parameters, and use Node's error codes for invalid data: URIs (#​16368)
  • [jest-runtime] Key ES modules by full URL, so query and fragment suffixes create the same module instances as Node and show up in import.meta.url (#​16375)
  • [jest-runtime] Share modules between overlapping graphs when a CommonJS module require()s an ES module mid-load, instead of evaluating shared dependencies twice (#​16375)
  • [jest-runtime] Throw ERR_REQUIRE_CYCLE_MODULE like Node when a CommonJS module require()s an ES module that is still being loaded, instead of evaluating the module a second time (#​16366)
  • [jest-runtime] Key builtin modules in the ESM registry by one canonical specifier (#​16341)
  • [jest-runtime] import.meta.resolve() for a builtin uses its node: specifier (#​16341)
  • [jest-runtime] Fall back to native ESM when a .js file contains ESM syntax but has no "type":"module" marker (#​16152)
  • [jest-runtime] Allow require() of ESM-marked files on Node < 24.9 via transform fallback (#​16244)
  • [jest-runtime, @&#8203;jest/transform] Surface actionable ERR_REQUIRE_ESM error for files with untransformed ESM syntax instead of the generic "unexpected token" message (#​16244)
  • [jest-runtime] Support older test environments whose moduleMocker does not implement clearMocksOnScope (#​16169)
  • [jest-runtime] Apply jest.unstable_mockModule when the mocked file itself is require()d, not only when it is imported as a dependency (#​16389)
  • [jest-runtime] Apply jest.unstable_mockModule to statically imported data: URIs on Node 24.9+, matching dynamic import() (#​16389)
  • [jest-runtime] Run an async jest.unstable_mockModule factory once per module instead of twice, and fail the import instead of crashing the worker when the factory rejects (#​16389)
  • [jest-runtime] Hide a require(esm) module that failed to evaluate from require.cache, as Node does, instead of exposing a namespace with uninitialized bindings (#​16389)
  • [jest-runtime] Strip the byte-order mark when importing a JSON module, matching require() and Node (#​16389)
  • [jest-runtime] Throw ERR_REQUIRE_ASYNC_MODULE when require(esm) runs under an async-only custom resolver, instead of silently resolving with the default resolver (#​16389)
  • [jest-runtime] Parse imported JSON modules with the test realm's JSON, so their objects pass instanceof Object inside the test like require()d JSON does (#​16389)
  • [jest-runtime] Accept every file: URL string in the sandboxed module.createRequire, including one with a localhost authority, as Node does (#​16389)
  • [jest-runtime] Point at {virtual: true} when jest.mock or jest.unstable_mockModule is given a module that cannot be resolved (#​16389)
  • [jest-reporters] Fix coverage report table formatting in CI/GitHub Actions environments where process.stdout.columns is undefined by falling back to the COLUMNS env var or 80 columns in CI, preserving existing behaviour in other non-TTY environments (#​16227)
  • [jest-runtime] Support CJS-in-ESM exports via "module.exports" named exports (#​16277)
  • [jest-snapshot] Keep a skipped or failed test's hinted snapshots, instead of reporting them obsolete (#​16348)
  • [jest-util] Stop globsToMatcher reusing a cached matcher compiled with different picomatch options, and keep its dot: true default when dot is passed as undefined (#​16381)
  • [pretty-format] Move the react-is aliases into the @jest scope, so they cannot be shadowed by unrelated packages published under the alias names (#​16333)
Chore & Maintenance
  • [docs] Document the intentional divergences from Node's module system in the ECMAScript Modules page (#​16368)
  • [docs] Note deprecation of react-test-renderer in React Native tutorial and pretty-format README (#​16294)
  • [docs] Use @testing-library/react-native in the React Native tutorial instead of the deprecated react-test-renderer (#​16318)
  • [babel-jest, @&#8203;jest/transform] Update babel-plugin-istanbul to v8 (#​16049)
  • [jest-config, @&#8203;jest/reporters, jest-runtime] Update glob to v13 (#​16397)
  • [jest-haste-map] Refactor massive class into multiple files (#​16180)
  • [jest-haste-map] Drop walker dependency; replace hand-rolled directory recursion in the JS crawler and watcher startup with fdir (#​16187)
  • [jest-haste-map] Reuse cached metadata for files whose haste name is a known duplicate, instead of re-reading and re-parsing them on every startup (#​16351)
  • [jest-haste-map] Cache the watchman socket path and replace the watchman --version probe with get-sockname, so warm runs spawn no watchman processes (#​16386)
  • [jest-resolve] Store the per-directory package-type lookup in the cache it reads, so it actually memoizes (#​16369)
  • [jest-resolve, jest-runtime] Cut repeated work on the resolution hot path: hoist the platform-extension list to construction, memoize isCoreModule and the options cache-key serialization, skip mapper preparation when no moduleNameMapper is configured, run each mapper regex once, and stop re-parsing NODE_OPTIONS on every default-resolver call (#​16371)
  • [jest-resolve] Cut warm resolution cost to about a third: reuse one unrs-resolver factory per options shape instead of cloning per resolution, compose the factory cache key from per-array cached strings instead of serializing options, and stop constructing an Error for misses that findNodeModule swallows; add a __benchmarks__ suite for the default resolver (#​16373)
  • [jest-runner, @&#8203;jest/source-map] Replace source-map-support with an implementation in @jest/source-map (#​16327)
  • [jest-snapshot] Load babel, semver and synckit lazily, so requiring the package (which every test process does through @jest/expect) no longer loads ~200 modules that only writing inline snapshots needs (#​16387)
  • [jest-runtime] Reduce per-require overhead: skip module ID resolution when no mock can apply, answer core modules before probing for a manual mock, share one require.cache proxy across modules, and cache empty files (#​16376)
  • [@jest/source-map] Deprecate getCallsite in favour of SourceMapSupport#getCallsite (#​16327)
  • [jest-runtime] Avoid magical null value in ESM loader (#​16160)

v30.4.2

Compare Source

Fixes
  • [jest-runtime] Fix named imports from CJS modules whose module.exports is a function with own-property exports (#​16150)

v30.4.1

Compare Source

Features
  • [jest-config, jest-core, jest-runner, jest-schemas, jest-types] Allow custom runner configuration options via tuple format ['runner-path', {options}] (#​16141)
Fixes
  • [jest-runtime] Align CJS-from-ESM default export with Node: module.exports is always the ESM default, __esModule unwrapping is no longer applied (#​16143)

v30.4.0

Compare Source

Features
  • [babel-jest] Support collecting coverage from .mts, .cts (and other) files (#​15994)
  • [jest-circus, jest-cli, jest-config, jest-core, jest-jasmine2, jest-types] Add --collect-tests flag to discover and list tests without executing them (#​16006)
  • [jest-config, jest-runner, jest-worker] Add workerGracefulExitTimeout config option to control how long workers are given to exit before being force-killed (#​15984)
  • [jest-config] Add support for jest.config.mts as a valid configuration file (#​16005)
  • [jest-config, jest-core, jest-reporters, jest-runner] verbose and silent can now be set per-project; the project-level value overrides the global value for that project's tests (#​16133)
  • [@jest/fake-timers] Accept Temporal.Duration in jest.advanceTimersByTime() and jest.advanceTimersByTimeAsync() (#​16128)
  • [@jest/fake-timers] Accept Temporal.Instant and Temporal.ZonedDateTime in jest.setSystemTime() and useFakeTimers({now}) (#​16128)
  • [@jest/fake-timers] Support faking Temporal.Now.* (#​16131)
  • [jest-mock] Add clearMocksOnScope(scope) on ModuleMocker for clearing every mock function exposed on a scope object (#​16088)
  • [jest-resolve] Add canResolveSync() on Resolver so callers can detect when a user-configured resolver only exports an async hook (#​16064)
  • [jest-runtime] Use synchronous evaluate() for ES modules without top-level await on Node versions that support it (v24.9+), and prefer the synchronous transform path when a sync transformer is configured (#​16062)
  • [jest-runtime] Support require() of ES modules on Node v24.9+ (#​16074)
  • [jest-runtime] Validate TC39 import attributes (with { type: 'json' }) on ESM imports (#​16127)
  • [@jest/transform] Add canTransformSync(filename) on ScriptTransformer so callers can pick the sync vs async transform path (#​16062)
  • [jest-util] Add isError helper (#​16076)
  • [pretty-format] Support React 19 (#​16123)
Fixes
  • [expect-utils] Fix toStrictEqual failing on structuredClone results due to cross-realm constructor mismatch (#​15959)
  • [@jest/expect-utils] Prevent toMatchObject/subset matching from throwing when encountering exotic iterables (#​15952)
  • [fake-timers] Convert Date to milliseconds before passing to @sinonjs/fake-timers (#​16029)
  • [jest] Export GlobalConfig and ProjectConfig TypeScript types (#​16132)
  • [jest-circus] Prevent crash when asyncError is undefined for non-Error throws (#​16003)
  • [jest-circus, jest-jasmine2] Include Error.cause in JSON failureMessages output (#​15967)
  • [jest-config] Fix preset path resolution on Windows when the preset uses subpath exports (#​15961)
  • [jest-config] Allow collectCoverage and coverageProvider in project config without a validation warning (#​16132)
  • [jest-config] Project config validator now emits "is not supported in an individual project configuration" instead of "probably a typing mistake" for known global-only options (#​16132)
  • [jest-environment-node] Fix --localstorage-file warning on Node 25+ (#​16086)
  • [jest-reporters] Apply global coverage threshold to unmatched pattern files in addition to glob/path thresholds (#​16137)
  • [jest-reporters, jest-runner, jest-runtime, jest-transform] Fix coverage report not showing correct code coverage when using projects config option (#​16140)
  • [jest-runtime] Resolve expect and @jest/expect from the internal module registry so test-file imports share the same JestAssertionError as the global expect (#​16130)
  • [jest-runtime] Improve CJS-from-ESM interop: __esModule/Babel default unwrap, broader named-export coverage, and shared CJS singleton across importers (#​16050)
  • [jest-runtime] Load .js files with ESM syntax but no "type":"module" marker as native ESM (#​16050)
  • [jest-runtime] Extend the .js-with-ESM-syntax fallback to require() on Node v24.9+ - falls back to require(esm) when the CJS parser rejects ESM syntax (#​16078)
  • [jest-runtime] Fix deadlocks and double-evaluation in concurrent ESM and wasm imports (#​16050)
  • [jest-runtime] Fix error when require() is called after the Jest environment has been torn down (#​15951)
  • [jest-runtime] Fix missing error when import() is called after the Jest environment has been torn down (#​16080)
  • [jest-runtime] Fix virtual unstable_mockModule registrations not respected in ESM (#​16081)
  • [jest-runtime] Apply moduleNameMapper when resolving modules with require.resolve() and the paths option (#​16135)
Chore & Maintenance
  • [@jest/fake-timers] Upgrade @sinonjs/fake-timers (#​16139)
  • [jest-runtime] Use synchronous linkRequests / instantiate for ESM linking on Node v24.9+ (#​16063)

v30.3.0

Compare Source

Features
  • [jest-config] Add defineConfig and mergeConfig helpers for type-safe Jest config (#​15844)
  • [jest-fake-timers] Add setTimerTickMode to configure how timers advance
  • [*] Reduce token usage when run through LLMs (3f17932)
Fixes
  • [jest-config] Keep CLI coverage output when using --json with --outputFile (#​15918)
  • [jest-mock] Use Symbol from test environment (#​15858)
  • [jest-reporters] Fix issue where console output not displayed for GHA reporter even with silent: false option (#​15864)
  • [jest-runtime] Fix issue where user cannot utilize dynamic import despite specifying --experimental-vm-modules Node option (#​15842)
  • [jest-test-sequencer] Fix issue where failed tests due to compilation errors not getting re-executed even with --onlyFailures CLI option (#​15851)
  • [jest-util] Make sure process.features.require_module is false (#​15867)
Chore & Maintenance
  • [*] Replace remaining micromatch uses with picomatch
  • [deps] Update to sinon/fake-timers v15
  • [docs] Update V30 migration guide to notify users on jest.mock() work with case-sensitive path (#​15849)
  • Updated Twitter icon to match the latest brand guidelines (#​15869)

v30.2.0

Compare Source

Chore & Maintenance
  • [*] Update example repo for testing React Native projects (#​15832)
  • [*] Update jest-watch-typeahead to v3 (#​15830)

v30.1.3

Compare Source

Fixes
  • Fix unstable_mockModule with node: prefixed core modules.

v30.1.2

Compare Source

Fixes
  • [jest-snapshot-utils] Correct snapshot header regexp to work with newline across OSes (#​15803)

v30.1.1

Compare Source

Fixes
  • [jest-snapshot-utils] Fix deprecated goo.gl snapshot warning not handling Windows end-of-line sequences (#​15800)
  • [jest-snapshot-utils] Improve messaging about goo.gl snapshot link change (#​15821)

v30.1.0

Compare Source

v30.0.5

Compare Source

Features
  • [jest-config] Allow testMatch to take a string value
  • [jest-worker] Let workerIdleMemoryLimit accept 0 to always restart worker child processes
Fixes

v30.0.4

Compare Source

Features
  • [expect] The Inverse type is now exported (#​15714)
  • [expect] feat: support async functions in toBe (#​15704)
Fixes
  • [jest] jest --onlyFailures --listTests now correctly lists only failed tests (#​15700)
  • [jest-snapshot] Handle line endings in snapshots (#​15708)

v30.0.3

Compare Source

Fixes
  • [jest-config] Fix ESM TS config loading in a CJS project (#​15694)
  • [jest-core] jest --onlyFailures --listTests now correctly lists only failed tests(#​15700)
Features
  • [jest-diff] Show non-printable control characters to diffs (#​15696)

v30.0.2

Compare Source

Fixes
  • [jest-matcher-utils] Make 'deepCyclicCopyObject' safer by setting descriptors to a null-prototype object (#​15689)
  • [jest-util] Make garbage collection protection property writable (#​15689)

v30.0.1

Compare Source

Features
  • [jest-resolver] Implement the defaultAsyncResolver (#​15679)
Fixes
  • [jest-resolver] Resolve builtin modules correctly (#​15683)
  • [jest-environment-node, jest-util] Avoid setting globals cleanup protection symbol when feature is off (#​15684)
Chore & Maintenance
  • [*] Remove and deprecate jest-repl package (#​15673)
  • [jest-resolver] Replace custom isBuiltinModule with node's isBuiltin (#​15685)

v30.0.0

Compare Source

Features
  • [*] Renamed globalsCleanupMode to globalsCleanup and --waitNextEventLoopTurnForUnhandledRejectionEvents to --waitForUnhandledRejections
  • [expect] Add ArrayOf asymmetric matcher for validating array elements. (#​15567)
  • [babel-jest] Add option excludeJestPreset to allow opting out of babel-preset-jest (#​15164)
  • [expect] Revert #​15038 to fix expect(fn).toHaveBeenCalledWith(expect.objectContaining(...)) when there are multiple calls (#​15508)
  • [jest-circus, jest-cli, jest-config] Add waitNextEventLoopTurnForUnhandledRejectionEvents flag to minimise performance impact of correct detection of unhandled promise rejections introduced in #​14315 (#​14681)
  • [jest-circus] Add a waitBeforeRetry option to jest.retryTimes (#​14738)
  • [jest-circus] Add a retryImmediately option to jest.retryTimes (#​14696)
  • [jest-circus, jest-jasmine2] Allow setupFilesAfterEnv to export an async function (#​14749)
  • [jest-circus, jest-test-result] Add startedAt timestamp in TestCaseResultObject within onTestCaseResult (#​15145)
  • [jest-cli] Export buildArgv (#​15310)
  • [jest-config] [BREAKING] Add mts and cts to default moduleFileExtensions config (#​14369)
  • [jest-config] [BREAKING] Update testMatch and testRegex default option for supporting mjs, cjs, mts, and cts (#​14584)
  • [jest-config] Loads config file from provided path in package.json (#​14044)
  • [jest-config] Allow loading jest.config.cts files (#​14070)
  • [jest-config] Show rootDir in error message when a preset fails to load (#​15194)
  • [jest-config] Support loading TS config files using esbuild-register via docblock loader (#​15190)
  • [jest-config] Allow passing TS config loader options via docblock comment (#​15234)
  • [jest-config] If Node is running with type stripping enabled, do not require a TS loader (#​15480)
  • [@jest/core] Group together open handles with the same stack trace (#​13417, & #​14789)
  • [@jest/core] Add perfStats to surface test setup overhead (#​14622)
  • [@jest/core] [BREAKING] Changed --filter to accept an object with shape { filtered: Array<string> } to match documentation (#​13319)
  • [@jest/core] Support --outputFile option for --listTests (#​14980)
  • [@jest/core] Stringify Errors properly with --json flag (#​15329)
  • [@jest/core, @&#8203;jest/test-sequencer] [BREAKING] Exposes globalConfig & contexts to TestSequencer (#​14535, & #​14543)
  • [jest-each] Introduce %$ option to add number of the test to its title (#​14710)
  • [@jest/environment] [BREAKING] Remove deprecated jest.genMockFromModule() (#​15042)
  • [@jest/environment] [BREAKING] Remove unnecessary defensive code (#​15045)
  • [jest-environment-jsdom] [BREAKING] Upgrade JSDOM to v22 (#​13825)
  • [@jest/environment-jsdom-abstract] Introduce new package which abstracts over the jsdom environment, allowing usage of custom versions of JSDOM (#​14717)
  • [jest-environment-node] Update jest environment with dispose symbols Symbol (#​14888 & #​14909)
  • [expect, @&#8203;jest/expect] [BREAKING] Add type inference for function parameters in CalledWith assertions (#​15129)
  • [@jest/expect-utils] Properly compare all types of TypedArrays (#​15178)
  • [@jest/fake-timers] [BREAKING] Upgrade @sinonjs/fake-timers to v13 (#​14544 & #​15470)
  • [@jest/fake-timers] Exposing new modern timers function advanceTimersToFrame() which advances all timers by the needed milliseconds to execute callbacks currently scheduled with requestAnimationFrame (#​14598)
  • [jest-matcher-utils] Add SERIALIZABLE_PROPERTIES to allow custom serialization of objects (#​14893)
  • [jest-mock] Add support for the Explicit Resource Management proposal to use the using keyword with jest.spyOn(object, methodName) (#​14895)
  • [jest-reporters] Add support for DEC mode 2026 (#​15008)
  • [jest-resolver] Support file:// URLs as paths (#​15154)
  • [jest-resolve,jest-runtime,jest-resolve-dependencies] Pass the conditions when resolving stub modules (#​15489)
  • [jest-runtime] Exposing new modern timers function jest.advanceTimersToFrame() from @jest/fake-timers (#​14598)
  • [jest-runtime] Support import.meta.filename and import.meta.dirname (available from Node 20.11) (#​14854)
  • [jest-runtime] Support import.meta.resolve (#​14930)
  • [jest-runtime] [BREAKING] Make it mandatory to pass globalConfig to the Runtime constructor (#​15044)
  • [jest-runtime] Add unstable_unmockModule (#​15080)
  • [jest-runtime] Add onGenerateMock transformer callback for auto generated callbacks (#​15433 & #​15482)
  • [jest-runtime] [BREAKING] Use vm.compileFunction over vm.Script (#​15461)
  • [@jest/schemas] Upgrade @sinclair/typebox to v0.34 (#​15450)
  • [@jest/types] test.each(): Accept a readonly (as const) table properly (#​14565)
  • [@jest/types] Improve argument type inference passed to test and describe callback functions from each tables (#​14920)
  • [jest-snapshot] [BREAKING] Add support for Error causes in snapshots (#​13965)
  • [jest-snapshot] Support Prettier 3 (#​14566)
  • [@jest/util-snapshot] Extract utils used by tooling from jest-snapshot into its own package (#​15095)
  • [pretty-format] [BREAKING] Do not render empty string children ('') in React plugin (#​14470)
Fixes
  • [expect] Show AggregateError to display (#​15346)
  • [*] Replace exit with exit-x (#​15399)
  • [babel-plugin-jest-hoist] Use denylist instead of the deprecated blacklist for Babel 8 support (#​14109)
  • [babel-plugin-jest-hoist] Do not rely on buggy Babel behaviour (#​15415)
  • [expect] Check error instance type for toThrow/toThrowError (#​14576)
  • [expect] Improve diff for failing expect.objectContaining (#​15038)
  • [expect] Use Array.isArray to check if an array is an Array (#​15101)
  • [expect] Fix Error cause assertion errors (#​15339)
  • [jest-changed-files] Print underlying errors when VCS commands fail (#​15052)
  • [jest-changed-files] Abort sl root call if output resembles a steam locomotive (#​15053)
  • [jest-circus] [BREAKING] Prevent false test failures caused by promise rejections handled asynchronously (#​14315)
  • [jest-circus] Replace recursive makeTestResults implementation with iterative one (#​14760)
  • [jest-circus] Omit expect.hasAssertions() errors if a test already has errors (#​14866)
  • [jest-circus, jest-expect, jest-snapshot] Pass test.failing tests when containing failing snapshot matchers (#​14313)
  • [jest-circus] Concurrent tests now emit jest circus events at the correct point and in the expected order. (#​15381)
  • [jest-cli] [BREAKING] Validate CLI flags that require arguments receives them (#​14783)
  • [jest-config] Make sure to respect runInBand option (#​14578)
  • [jest-config] Support testTimeout in project config (#​14697)
  • [jest-config] Support coverageReporters in project config (#​14830)
  • [jest-config] Allow reporters in project config (#​14768)
  • [jest-config] Allow Node16/NodeNext/Bundler moduleResolution in project's tsconfig (#​14739)
  • [@jest/create-cache-key-function] Correct the return type of createCacheKey (#​15159)
  • [jest-each] Allow $keypath templates with null or undefined values (#​14831)
  • [@jest/expect-utils] Fix comparison of DataView (#​14408)
  • [@jest/expect-utils] [BREAKING] exclude non-enumerable in object matching (#​14670)
  • [@jest/expect-utils] Fix comparison of URL (#​14672)
  • [@jest/expect-utils] Check Symbol properties in equality (#​14688)
  • [@jest/expect-utils] Catch circular references within arrays when matching objects (#​14894)
  • [@jest/expect-utils] Fix not addressing to Sets and Maps as objects without keys (#​14873)
  • [jest-haste-map] Fix errors or clobbering with multiple hasteImplModulePaths (#​15522)
  • [jest-leak-detector] Make leak-detector more aggressive when running GC (#​14526)
  • [jest-runtime] Properly handle re-exported native modules in ESM via CJS (#​14589)
  • [jest-runtime] Refactor _importCoreModel so required core module is consistent if modified while loading (#​15517)
  • [jest-schemas, jest-types] [BREAKING] Fix type of testFailureExitCode config option(#​15232)
  • [jest-util] Make sure isInteractive works in a browser (#​14552)
  • [pretty-format] [BREAKING] Print ArrayBuffer and DataView correctly (#​14290)
  • [pretty-format] Fixed a bug where "anonymous custom elements" were not being printed as expected. (#​15138)
  • [jest-cli] When specifying paths on the command line, only match against the relative paths of the test files (#​12519)
    • [BREAKING] Changes testPathPattern configuration option to testPathPatterns, which now takes a list of patterns instead of the regex.
    • [BREAKING] --testPathPattern is now --testPathPatterns
    • [BREAKING] Specifying testPathPatterns when programmatically calling watch must be specified as new TestPathPatterns(patterns), where TestPathPatterns can be imported from @jest/pattern
  • [jest-reporters, jest-runner] Unhandled errors without stack get correctly logged to console (#​14619)
  • [jest-util] Always load mjs files with import (#​15447)
  • [jest-worker] Properly handle a circular reference error when worker tries to send an assertion fails where either the expected or actual value is circular (#​15191)
  • [jest-worker] Properly handle a BigInt when worker tries to send an assertion fails where either the expected or actual value is BigInt (#​15191)
  • [expect] Resolve issue where ObjectContaining matched non-object values. #​15463.
    • Adds a conditional/check to ensure the argument passed to expect is an object.
    • Add unit tests for new ObjectContaining behavior.
    • Remove invalid/wrong test case assertions for ObjectContaining.
  • [jest-worker] Addresses incorrect state on exit (#​15610)
Performance
  • [*] [BREAKING] Bundle all of Jest's modules into index.js (#​12348, #​14550 & #​14661)
  • [jest-haste-map] Only spawn one process to check for watchman installation (#​14826)
  • [jest-runner] Better cleanup source-map-support after test to resolve (minor) memory leak (#​15233)
  • [jest-resolver] Migrate resolve and resolve.exports to unrs-resolver (#​15619)
  • [jest-circus, jest-environment-node, jest-repl, jest-runner, jest-util] Cleanup global variables on environment teardown to reduce memory leaks (#​15215 & #​15636 & #​15643)
Chore & Maintenance
  • [jest-environment-jsdom, jest-environment-jsdom-abstract] Increased version of jsdom to ^26.0.0 (#​15473)
  • [*] Increase version of micromatch to ^4.0.7 (#​15082)
  • [*] [BREAKING] Drop support for Node.js versions 14, 16, 19, 21 and 23 (#​14460, #​15118, #​15623, #​15640)
  • [*] [BREAKING] Drop support for typescript@4.3, minimum version is now 5.4 (#​14542, #​15621)
  • [*] Depend on exact versions of monorepo dependencies instead of ^ range (#​14553)
  • [*] [BREAKING] Add ESM wrapper for all of Jest's modules (#​14661)
  • [*] [BREAKING] Upgrade to glob@10 (#​14509)
  • [*] Use TypeError over Error where appropriate (#​14799)
  • [docs] Fix typos in CHANGELOG.md and packages/jest-validate/README.md (#​14640)
  • [docs] Don't use alias matchers in docs (#​14631)
  • [babel-jest, babel-preset-jest] [BREAKING] Increase peer dependency of @babel/core to ^7.11 (#​14109)
  • [babel-jest, @&#8203;jest/transform] Update babel-plugin-istanbul to v6 (#​15156)
  • [babel-plugin-jest-hoist] Move unnecessary dependencies to devDependencies (#​15010)
  • [expect] [BREAKING] Remove .toBeCalled(), .toBeCalledTimes(), .toBeCalledWith(), .lastCalledWith(), .nthCalledWith(), .toReturn(), .toReturnTimes(), .toReturnWith(), .lastReturnedWith(), .nthReturnedWith() and .toThrowError() matcher aliases (#​14632)
  • [jest-cli, jest-config, @&#8203;jest/types] [BREAKING] Remove deprecated --init argument (#​14490)
  • [jest-config, @&#8203;jest/core, jest-util] Upgrade ci-info (#​14655)
  • [jest-mock] [BREAKING] Remove MockFunctionMetadataType, MockFunctionMetadata and SpyInstance types (#​14621)
  • [@jest/reporters] Upgrade istanbul-lib-source-maps (#​14924)
  • [jest-schemas] Upgrade @sinclair/typebox (#​14775)
  • [jest-transform] Upgrade write-file-atomic (#​14274)
  • [jest-util] Upgrade picomatch to v4 (#​14653 & #​14885)
  • [docs] Append to NODE_OPTIONS, not overwrite ([#&#8203;14730](https://github.com/jestjs/jest/pull/14730))
  • [docs] Updated .toHaveBeenCalled() documentation to correctly reflect its functionality (#​14842)
  • [docs] Link NestJS documentation on testing with Jest (#​14940)
  • [docs] Revised documentation for .toHaveBeenCalled() to accurately depict its functionality. (#​14853)
  • [docs] Removed ExpressJS reference link from documentation due to dead link (#​15270)
  • [docs] Correct broken links in docs (#​15359)

Configuration

📅 Schedule: Branch creation - At any time (no schedule defined), Automerge - At any time (no schedule defined).

🚦 Automerge: Disabled by config. Please merge this manually once you are satisfied.

Rebasing: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox.

🔕 Ignore: Close this PR and you won't be reminded about these updates again.


  • If you want to rebase/retry this PR, check this box

This PR has been generated by Renovate Bot.

This PR contains the following updates: | Package | Change | [Age](https://docs.renovatebot.com/merge-confidence/) | [Confidence](https://docs.renovatebot.com/merge-confidence/) | |---|---|---|---| | [@types/jest](https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/jest) ([source](https://github.com/DefinitelyTyped/DefinitelyTyped/tree/HEAD/types/jest)) | [`^29.5.6` -> `^30.0.0`](https://renovatebot.com/diffs/npm/@types%2fjest/29.5.14/30.0.0) | ![age](https://developer.mend.io/api/mc/badges/age/npm/@types%2fjest/30.0.0?slim=true) | ![confidence](https://developer.mend.io/api/mc/badges/confidence/npm/@types%2fjest/29.5.14/30.0.0?slim=true) | | [jest](https://jestjs.io/) ([source](https://github.com/jestjs/jest/tree/HEAD/packages/jest)) | [`^29.7.0` -> `^30.0.0`](https://renovatebot.com/diffs/npm/jest/29.7.0/30.5.1) | ![age](https://developer.mend.io/api/mc/badges/age/npm/jest/30.5.1?slim=true) | ![confidence](https://developer.mend.io/api/mc/badges/confidence/npm/jest/29.7.0/30.5.1?slim=true) | --- ### Release Notes <details> <summary>jestjs/jest (jest)</summary> ### [`v30.5.1`](https://github.com/jestjs/jest/blob/HEAD/CHANGELOG.md#3051) [Compare Source](https://github.com/jestjs/jest/compare/v30.5.0...v30.5.1) ##### Fixes - `[jest-config]` Don't warn about global-only options in the config that supplies the global config - the root config a project resolves to, or the first entry of `--projects` when no root config is passed ([#&#8203;16411](https://github.com/jestjs/jest/pull/16411)) - `[jest-config, jest-types]` Stop accepting `reporters`, `coverageReporters`, `workerIdleMemoryLimit`, `cwd` and `runnerOptions` in a project config - they were silently ignored, and now warn like the other global-only options ([#&#8203;16411](https://github.com/jestjs/jest/pull/16411)) - `[jest-config, jest-validate]` Warn about `maxWorkers` and `coverageThreshold` in a project config instead of dropping them without a word ([#&#8203;16411](https://github.com/jestjs/jest/pull/16411)) - `[jest-resolve]` Match `moduleNameMapper` patterns against the specifier as written again (reverting [#&#8203;16390](https://github.com/jestjs/jest/pull/16390)) ([#&#8203;16417](https://github.com/jestjs/jest/pull/16417)) - `[jest-runtime]` Resolve package `imports` specifiers like `#dep` under ESM again ([#&#8203;16413](https://github.com/jestjs/jest/pull/16413)) ##### Chore & Maintenance - `[jest-util]` Name the `testEnvironmentOptions.globalsCleanup` option and link the docs from the `JEST-01` deprecation warning, and document the option's modes ([#&#8203;16404](https://github.com/jestjs/jest/pull/16404)) ### [`v30.5.0`](https://github.com/jestjs/jest/blob/HEAD/CHANGELOG.md#3050) [Compare Source](https://github.com/jestjs/jest/compare/v30.4.2...v30.5.0) ##### Features - `[@jest/expect-utils, jest-mock]` Add `mockFn.whenCalledWith(...args)` for configuring return values per argument list, with first-class asymmetric-matcher support ([#&#8203;16053](https://github.com/jestjs/jest/pull/16053)) - `[@jest/expect-utils]` Export `AsymmetricMatcher` and `FunctionParameters` types (previously private to `expect`) ([#&#8203;16053](https://github.com/jestjs/jest/pull/16053)) - `[jest-circus, jest-core, jest-jasmine2, jest-test-result, jest-types]` `--collectTests` now expands `test.each`/`describe.each` cases and reports per-status counts (skipped/todo via the new `wouldRun` flag for selected tests) plus a summary line that match a real run, including under `--testNamePattern` and `.only`/`fdescribe` focus on both the circus and jasmine2 runners ([#&#8203;16259](https://github.com/jestjs/jest/pull/16259)) - `[jest-circus, jest-environment, jest-runtime, jest-types]` Add describe-level retries via `jest.retryTimes(..., {entireDescribe: true})` ([#&#8203;16322](https://github.com/jestjs/jest/pull/16322)) - `[jest-circus, jest-message-util, jest-reporters, jest-types]` Add `retryMessages` to `AssertionResult` and export `formatErrorStack`, so the retry log renders nested `cause` and `AggregateError` sections with code frames instead of serialized `[cause]:`/`[errors]:` markers ([#&#8203;16316](https://github.com/jestjs/jest/pull/16316)) - `[jest-circus, jest-types]` Add `unhandledErrorsDetailed` to `Circus.RunResult`, so an unhandled rejection reports its `cause` chain and `AggregateError` entries with code frames instead of a pre-serialized stack ([#&#8203;16316](https://github.com/jestjs/jest/pull/16316)) - `[jest-haste-map]` Replace `NodeWatcher` and `FSEventsWatcher` with `@parcel/watcher` for the non-watchman watch path ([#&#8203;16188](https://github.com/jestjs/jest/pull/16188)) - `[jest-resolve]` Bump `unrs-resolver` to 1.12.1, remove `jest-pnp-resolver` and unnecessary checks ([#&#8203;15721](https://github.com/jestjs/jest/pull/15721)) - `[jest-resolve]` Honor Node's `--preserve-symlinks` / `NODE_PRESERVE_SYMLINKS` in the default resolver by passing `symlinks: false` to `unrs-resolver` ([#&#8203;16260](https://github.com/jestjs/jest/pull/16260)) - `[jest-runtime]` Apply automocking and manual `__mocks__` files to synchronously evaluable ESM graphs on Node 24.9+ - static imports, dynamic `import()` and `require()` of an ESM file now generate an automock from the real module's namespace instead of failing with "Attempting to import a mock without a factory". Graphs that need async evaluation (top-level await) or an async-only resolver or transformer still throw ([#&#8203;16391](https://github.com/jestjs/jest/pull/16391)) - `[jest-runtime]` Route `process.getBuiltinModule` through the sandbox, so it returns the sandbox `process` and the hooked `node:module` instead of the host's ([#&#8203;16391](https://github.com/jestjs/jest/pull/16391)) - `[jest-runtime]` Throw an actionable error from `module.register()` and `module.registerHooks()` inside a test - the hooks attached to the loader running Jest itself, never saw the sandboxed requires they were meant for, and stayed registered for every later test file in the worker ([#&#8203;16391](https://github.com/jestjs/jest/pull/16391)) - `[jest-runtime]` Surface resolution and import-attribute errors in an ESM graph before executing any of its CJS dependencies on Node 24.9+, matching Node's run-nothing-on-a-broken-graph behavior; the legacy loader on older versions keeps its linking-time execution order ([#&#8203;16391](https://github.com/jestjs/jest/pull/16391)) - `[jest-runtime]` Throw `ERR_SOURCE_PHASE_NOT_DEFINED` with an actionable message for `import source` and `import.source()`, instead of failing at instantiation with V8's bare "Source phase import object is not defined" ([#&#8203;16391](https://github.com/jestjs/jest/pull/16391)) - `[jest-runtime]` Emit the JSON-without-import-attribute deprecation warning once per test file instead of once per worker, so it is no longer silently swallowed for every file after the first ([#&#8203;16391](https://github.com/jestjs/jest/pull/16391)) - `[jest-runtime]` Set `import.meta.main` to `true` in the test file and `false` in every module it loads, matching Node 24+ ([#&#8203;16367](https://github.com/jestjs/jest/pull/16367)) - `[jest-runtime]` Resolve the `module-sync` export condition, so a package that exposes its ESM entry point for `require()` loads the same file Node would ([#&#8203;16336](https://github.com/jestjs/jest/pull/16336)) - `[jest-snapshot]` Add external snapshot paths to custom reporter failure details ([#&#8203;16374](https://github.com/jestjs/jest/pull/16374)) ##### Fixes - `[jest-console, jest-reporters]` `CustomConsole` now buffers console output so `TestResult.console` is populated for reporters when `verbose` is enabled, while `GitHubActionsReporter` avoids replaying buffered output in verbose mode ([#&#8203;16155](https://github.com/jestjs/jest/pull/16155)) - `[expect, jest-message-util, jest-pattern, jest-regex-util, jest-util]` Revert `node:` protocol imports to restore webpack/browser-bundle compatibility ([#&#8203;16167](https://github.com/jestjs/jest/pull/16167)) - `[expect]` Widen `toMatchObject` and `objectContaining` parameter type from `Record<string, unknown>` to `object` so class instances are accepted ([#&#8203;16196](https://github.com/jestjs/jest/pull/16196)) - `[jest-circus]` Call a generator test body with the shared test context, so `this` matches what a regular test function receives ([#&#8203;16347](https://github.com/jestjs/jest/pull/16347)) - `[jest-circus]` Capture the error listeners of the parent process instead of the in-sandbox `process`, so listeners registered before the test file survive teardown and sandbox listeners no longer leak onto the parent ([#&#8203;16347](https://github.com/jestjs/jest/pull/16347)) - `[jest-circus]` Clear `currentlyRunningTest` after skipped and todo tests ([#&#8203;16342](https://github.com/jestjs/jest/pull/16342)) - `[jest-circus]` Prevent late `done()` callbacks from affecting later test or hook invocations ([#&#8203;16343](https://github.com/jestjs/jest/pull/16343)) - `[jest-circus, jest-jasmine2]` Honor `--expand` when formatting `node:assert` failures, instead of always collapsing the diff ([#&#8203;16347](https://github.com/jestjs/jest/pull/16347)) - `[jest-circus, jest-jasmine2, jest-message-util]` Serialize the inner errors of an `AggregateError` into `failureMessages`, `retryReasons` and `unhandledErrors`, so `--json` output and reporter annotations include them ([#&#8203;16316](https://github.com/jestjs/jest/pull/16316)) - `[jest-circus, jest-snapshot]` Keep snapshot state and counts correct when a test retries ([#&#8203;16344](https://github.com/jestjs/jest/pull/16344)) - `[@jest/create-cache-key-function]` Include the caller support flags in the generated key, so a transformer that emits ESM or CJS based on them no longer shares one cache entry between the two ([#&#8203;16331](https://github.com/jestjs/jest/pull/16331)) - `[@jest/create-cache-key-function]` Include the stringified project config in the generated key, so editing a transformer's own settings invalidates what it cached ([#&#8203;16331](https://github.com/jestjs/jest/pull/16331)) - `[@jest/transform]` Include the caller support flags in a transform's cache key, so a file transformed both as ESM and as CJS no longer serves one shape's output for the other ([#&#8203;16331](https://github.com/jestjs/jest/pull/16331)) - `[jest-config]` Add missing `findRelatedTests`, `outputFile`, and `replname` entries to `ValidConfig` so they no longer trigger spurious "Unknown option" warnings ([#&#8203;16224](https://github.com/jestjs/jest/pull/16224)) - `[jest-config]` Use `--config` for the global config when multiple `--projects` are specified ([#&#8203;16273](https://github.com/jestjs/jest/pull/16273)) - `[jest-core]` Serialize `bigint` values in `--json` and `--outputFile` output as their literal form (`4n`), instead of failing the run with `TypeError: Do not know how to serialize a BigInt` ([#&#8203;16338](https://github.com/jestjs/jest/pull/16338)) - `[jest-core]` Do not report a `CustomGC` async resource (used by N-API addons such as napi-rs for per-isolate GC bookkeeping) as an open handle, since it is `napi_unref`'d by the addon and can never keep the event loop alive ([#&#8203;16379](https://github.com/jestjs/jest/pull/16379)) - `[jest-each]` Keep a `$&`, `` $` ``, `$'` or `$$` inside a `%p` param value out of the replacement, so the title shows the value instead of the text around it ([#&#8203;16338](https://github.com/jestjs/jest/pull/16338)) - `[jest-each]` Interpolate a `bigint` into a `%j` title as its literal form (`"4n"`) at any depth, instead of throwing `TypeError: Do not know how to serialize a BigInt` while collecting the tests ([#&#8203;16338](https://github.com/jestjs/jest/pull/16338)) - `[jest-environment, jest-runtime]` Bind `sandboxInjectedGlobals` to the right values when `injectGlobals` is `false`, instead of shifting every one of them by a position ([#&#8203;16377](https://github.com/jestjs/jest/pull/16377)) - `[jest-environment-node, jest-util]` Only warn about a conflicting `globalsCleanup` mode when one was explicitly configured, and follow the mode that is actually in effect ([#&#8203;16323](https://github.com/jestjs/jest/pull/16323)) - `[jest-environment-node, jest-util]` Stop resolving lazy globals when setting up an environment, so Node 26's builtin module globals are no longer loaded (and no longer emit their deprecation warnings) for every test file ([#&#8203;16324](https://github.com/jestjs/jest/pull/16324)) - `[jest-haste-map]` Keep watch mode alive when an outside process briefly makes a file unreadable on Windows, instead of tearing the watcher down on `EPERM` ([#&#8203;16295](https://github.com/jestjs/jest/pull/16295)) - `[jest-haste-map]` Keep indexing when an outside process holds a file open on Windows, instead of failing the whole crawl on `EPERM` ([#&#8203;16358](https://github.com/jestjs/jest/pull/16358)) - `[jest-haste-map]` Keep a duplicated manual mock resolving when the file it pointed at is deleted in watch mode ([#&#8203;16360](https://github.com/jestjs/jest/pull/16360)) - `[jest-haste-map]` Shut the worker farm down when a duplicate manual mock aborts the build under `throwOnModuleCollision` ([#&#8203;16354](https://github.com/jestjs/jest/pull/16354)) - `[jest-haste-map]` Attach the watchman client's `error` listener before the first command, so a watchman failure falls back to the node crawler instead of crashing on an unhandled `error` event, and always end the client ([#&#8203;16355](https://github.com/jestjs/jest/pull/16355)) - `[jest-haste-map]` Stop delivering watch events after `WatchmanWatcher` is closed, and route its warnings through the configured console ([#&#8203;16355](https://github.com/jestjs/jest/pull/16355)) - `[jest-haste-map]` Restore the nested `duplicates` index correctly in `ModuleMap.fromJSON`, so a haste collision reported inside a test worker raises `DuplicateHasteCandidatesError` instead of a `TypeError` ([#&#8203;16353](https://github.com/jestjs/jest/pull/16353)) - `[jest-haste-map]` Match watched files on a full extension, so `moduleFileExtensions: ['js']` no longer accepts `foo.mjs` ([#&#8203;16352](https://github.com/jestjs/jest/pull/16352)) - `[jest-haste-map]` Delimit the fields that make up the haste map cache key, so two different option sets cannot hash to the same cache file ([#&#8203;16352](https://github.com/jestjs/jest/pull/16352)) - `[jest-message-util]` Print the inner errors of an `AggregateError` thrown inside a test ([#&#8203;16316](https://github.com/jestjs/jest/pull/16316)) - `[jest-message-util]` Indent nested `cause` and `AggregateError` sections of a test failure by one level per depth, so the nesting is legible instead of rendering flat ([#&#8203;16316](https://github.com/jestjs/jest/pull/16316)) - `[jest-message-util]` Color stack traces line by line so blank lines stay blank ([#&#8203;16316](https://github.com/jestjs/jest/pull/16316)) - `[jest-message-util]` Detect Jest's own frames without assuming the checkout directory's name, and cover `@jest/*` packages, so stack traces and code frames point at user code ([#&#8203;16326](https://github.com/jestjs/jest/pull/16326)) - `[jest-mock]` `mockResolvedValue` / `mockRejectedValue` now see all overload return types, so a Promise-returning overload survives even when a later overload returns a non-Promise (e.g. `pg.Client['end']`) ([#&#8203;16237](https://github.com/jestjs/jest/pull/16237)) - `[@jest-environment/jsdom-abstract]` Make `@types/jsdom` a peer dependency ([#&#8203;16166](https://github.com/jestjs/jest/pull/16166)) - `[jest-mock]` Remove the leftover own accessor descriptor when restoring a `spyOn` of an inherited getter or setter, so the instance keeps reflecting the prototype ([#&#8203;16226](https://github.com/jestjs/jest/pull/16226)) - `[jest-resolve]` Include `extensionsToTreatAsEsm` in the `shouldLoadAsEsm` cache key, so projects with different extension lists don't read each other's answers ([#&#8203;16369](https://github.com/jestjs/jest/pull/16369)) - `[jest-resolve]` Make `getModuleIDAsync` build and cache `data:` URI module IDs the same way as `getModuleID` ([#&#8203;16370](https://github.com/jestjs/jest/pull/16370)) - `[jest-resolve]` Keep the `node:` prefix when resolving a core module asynchronously, so a builtin that only exists prefixed (`node:sea`, `node:sqlite`, `node:test`, `node:test/reporters`) resolves instead of failing as a missing bare package ([#&#8203;16388](https://github.com/jestjs/jest/pull/16388)) - `[jest-resolve]` Look up manual mocks for `node:` protocol specifiers under the unprefixed name they are stored as ([#&#8203;16388](https://github.com/jestjs/jest/pull/16388)) - `[jest-resolve]` Apply `moduleNameMapper` consistently to both spellings of core module specifiers (`fs` vs `node:fs`) ([#&#8203;16390](https://github.com/jestjs/jest/pull/16390)) - `[jest-resolve]` Keep virtual and ordinary mock module IDs isolated across test files ([#&#8203;16296](https://github.com/jestjs/jest/pull/16296)) - `[jest-resolve]` Guard missing `require.resolve.paths` ([#&#8203;16052](https://github.com/jestjs/jest/pull/16052)) - `[jest-resolve, jest-config, jest-runner]` Support a user resolver written as an ES module ([#&#8203;16332](https://github.com/jestjs/jest/pull/16332)) - `[jest-resolve, jest-runtime]` Throw the CJS parse error for ESM syntax in a `"type": "commonjs"` package or a `.cjs` file instead of loading it as ESM, matching Node ([#&#8203;16368](https://github.com/jestjs/jest/pull/16368)) - `[@jest/source-map]` Keep source map sources that name a scheme, such as `webpack:///`, instead of resolving them into a path that does not exist ([#&#8203;16327](https://github.com/jestjs/jest/pull/16327)) - `[@jest/source-map]` Look up `--testLocationInResults` positions at the right column, and keep a mapping to the first column instead of discarding it ([#&#8203;16327](https://github.com/jestjs/jest/pull/16327)) - `[@jest/source-map]` Warn when a source map cannot be parsed, instead of silently leaving its frames untranslated ([#&#8203;16327](https://github.com/jestjs/jest/pull/16327)) - `[jest-runner, @&#8203;jest/source-map]` Keep a source-mapped stack for an error thrown after the test environment was torn down ([#&#8203;16327](https://github.com/jestjs/jest/pull/16327)) - `[jest-runtime, @&#8203;jest/source-map]` Keep source maps past teardown and past the next test file's `install`, so a stack from a file no earlier stack mentioned still points at the original source ([#&#8203;16330](https://github.com/jestjs/jest/pull/16330)) - `[jest-runtime]` Report that no coverage was collected when `getAllV8CoverageInfoCopy` is called after `teardown`, instead of returning an empty result ([#&#8203;16385](https://github.com/jestjs/jest/pull/16385)) - `[jest-runtime]` Cache a CJS module's parsed exports before walking its re-exports, so two modules that re-export each other no longer overflow the stack when imported from ESM ([#&#8203;16363](https://github.com/jestjs/jest/pull/16363)) - `[jest-runtime]` Keep a re-exported ES module's parse failure from marking the re-exporting CommonJS file as ESM, so `module.exports = require('./dep.mjs')` loads instead of failing with `module is not defined` ([#&#8203;16363](https://github.com/jestjs/jest/pull/16363)) - `[jest-runtime]` Scope module mocks instantiated inside `jest.isolateModules`/`isolateModulesAsync` to that block, so a mock first imported there no longer outlives it - matching how CommonJS mocks already behave ([#&#8203;16365](https://github.com/jestjs/jest/pull/16365)) - `[jest-runtime]` Suspend module isolation while generating an automock, so loading the real module to read its shape no longer populates the isolated registry ([#&#8203;16365](https://github.com/jestjs/jest/pull/16365)) - `[jest-runtime]` Check a cached ES module's status before `require()` returns it, so a module whose evaluation threw rethrows that error and one left linked by a failed sibling is evaluated instead of returning uninitialized bindings ([#&#8203;16364](https://github.com/jestjs/jest/pull/16364)) - `[jest-runtime]` Report the original `ERR_REQUIRE_ASYNC_MODULE` when a `require()` of a top-level-await graph is retried, instead of a spurious "concurrent `import()`" error ([#&#8203;16364](https://github.com/jestjs/jest/pull/16364)) - `[jest-runtime]` Throw the evaluation error when another caller's `import()` of the same module failed while we awaited it, instead of resolving with the errored module ([#&#8203;16364](https://github.com/jestjs/jest/pull/16364)) - `[jest-runtime]` Mark the result of `require()`ing an ES module that has a default export with `__esModule: true` through a live-binding facade, and serve the same object from `require.cache`, matching Node ([#&#8203;16367](https://github.com/jestjs/jest/pull/16367)) - `[jest-runtime]` Provide a CommonJS module's exports under the `'module.exports'` named export when imported from ESM, matching Node 23+ ([#&#8203;16367](https://github.com/jestjs/jest/pull/16367)) - `[jest-runtime]` Give the test file itself a non-null `require.main` ([#&#8203;16367](https://github.com/jestjs/jest/pull/16367)) - `[jest-runtime]` Populate `module.children` with the modules a file loads, matching Node ([#&#8203;16368](https://github.com/jestjs/jest/pull/16368)) - `[jest-runtime]` Provide `import.meta.resolve` and `import.meta.jest` in `data:` URI modules, accept any-case mediatype parameters, and use Node's error codes for invalid `data:` URIs ([#&#8203;16368](https://github.com/jestjs/jest/pull/16368)) - `[jest-runtime]` Key ES modules by full URL, so query and fragment suffixes create the same module instances as Node and show up in `import.meta.url` ([#&#8203;16375](https://github.com/jestjs/jest/pull/16375)) - `[jest-runtime]` Share modules between overlapping graphs when a CommonJS module `require()`s an ES module mid-load, instead of evaluating shared dependencies twice ([#&#8203;16375](https://github.com/jestjs/jest/pull/16375)) - `[jest-runtime]` Throw `ERR_REQUIRE_CYCLE_MODULE` like Node when a CommonJS module `require()`s an ES module that is still being loaded, instead of evaluating the module a second time ([#&#8203;16366](https://github.com/jestjs/jest/pull/16366)) - `[jest-runtime]` Key builtin modules in the ESM registry by one canonical specifier ([#&#8203;16341](https://github.com/jestjs/jest/pull/16341)) - `[jest-runtime]` `import.meta.resolve()` for a builtin uses its `node:` specifier ([#&#8203;16341](https://github.com/jestjs/jest/pull/16341)) - `[jest-runtime]` Fall back to native ESM when a `.js` file contains ESM syntax but has no `"type":"module"` marker ([#&#8203;16152](https://github.com/jestjs/jest/pull/16152)) - `[jest-runtime]` Allow `require()` of ESM-marked files on Node < 24.9 via transform fallback ([#&#8203;16244](https://github.com/jestjs/jest/pull/16244)) - `[jest-runtime, @&#8203;jest/transform]` Surface actionable `ERR_REQUIRE_ESM` error for files with untransformed ESM syntax instead of the generic "unexpected token" message ([#&#8203;16244](https://github.com/jestjs/jest/pull/16244)) - `[jest-runtime]` Support older test environments whose `moduleMocker` does not implement `clearMocksOnScope` ([#&#8203;16169](https://github.com/jestjs/jest/pull/16169)) - `[jest-runtime]` Apply `jest.unstable_mockModule` when the mocked file itself is `require()`d, not only when it is imported as a dependency ([#&#8203;16389](https://github.com/jestjs/jest/pull/16389)) - `[jest-runtime]` Apply `jest.unstable_mockModule` to statically imported `data:` URIs on Node 24.9+, matching dynamic `import()` ([#&#8203;16389](https://github.com/jestjs/jest/pull/16389)) - `[jest-runtime]` Run an async `jest.unstable_mockModule` factory once per module instead of twice, and fail the import instead of crashing the worker when the factory rejects ([#&#8203;16389](https://github.com/jestjs/jest/pull/16389)) - `[jest-runtime]` Hide a `require(esm)` module that failed to evaluate from `require.cache`, as Node does, instead of exposing a namespace with uninitialized bindings ([#&#8203;16389](https://github.com/jestjs/jest/pull/16389)) - `[jest-runtime]` Strip the byte-order mark when importing a JSON module, matching `require()` and Node ([#&#8203;16389](https://github.com/jestjs/jest/pull/16389)) - `[jest-runtime]` Throw `ERR_REQUIRE_ASYNC_MODULE` when `require(esm)` runs under an async-only custom resolver, instead of silently resolving with the default resolver ([#&#8203;16389](https://github.com/jestjs/jest/pull/16389)) - `[jest-runtime]` Parse imported JSON modules with the test realm's `JSON`, so their objects pass `instanceof Object` inside the test like `require()`d JSON does ([#&#8203;16389](https://github.com/jestjs/jest/pull/16389)) - `[jest-runtime]` Accept every `file:` URL string in the sandboxed `module.createRequire`, including one with a `localhost` authority, as Node does ([#&#8203;16389](https://github.com/jestjs/jest/pull/16389)) - `[jest-runtime]` Point at `{virtual: true}` when `jest.mock` or `jest.unstable_mockModule` is given a module that cannot be resolved ([#&#8203;16389](https://github.com/jestjs/jest/pull/16389)) - `[jest-reporters]` Fix coverage report table formatting in CI/GitHub Actions environments where `process.stdout.columns` is undefined by falling back to the `COLUMNS` env var or `80` columns in CI, preserving existing behaviour in other non-TTY environments ([#&#8203;16227](https://github.com/jestjs/jest/pull/16227)) - `[jest-runtime]` Support CJS-in-ESM exports via `"module.exports"` named exports ([#&#8203;16277](https://github.com/jestjs/jest/pull/16277)) - `[jest-snapshot]` Keep a skipped or failed test's hinted snapshots, instead of reporting them obsolete ([#&#8203;16348](https://github.com/jestjs/jest/pull/16348)) - `[jest-util]` Stop `globsToMatcher` reusing a cached matcher compiled with different picomatch options, and keep its `dot: true` default when `dot` is passed as `undefined` ([#&#8203;16381](https://github.com/jestjs/jest/pull/16381)) - `[pretty-format]` Move the `react-is` aliases into the `@jest` scope, so they cannot be shadowed by unrelated packages published under the alias names ([#&#8203;16333](https://github.com/jestjs/jest/pull/16333)) ##### Chore & Maintenance - `[docs]` Document the intentional divergences from Node's module system in the ECMAScript Modules page ([#&#8203;16368](https://github.com/jestjs/jest/pull/16368)) - `[docs]` Note deprecation of `react-test-renderer` in React Native tutorial and `pretty-format` README ([#&#8203;16294](https://github.com/jestjs/jest/pull/16294)) - `[docs]` Use `@testing-library/react-native` in the React Native tutorial instead of the deprecated `react-test-renderer` ([#&#8203;16318](https://github.com/jestjs/jest/pull/16318)) - `[babel-jest, @&#8203;jest/transform]` Update `babel-plugin-istanbul` to v8 ([#&#8203;16049](https://github.com/jestjs/jest/pull/16049)) - `[jest-config, @&#8203;jest/reporters, jest-runtime]` Update `glob` to v13 ([#&#8203;16397](https://github.com/jestjs/jest/pull/16397)) - `[jest-haste-map]` Refactor massive class into multiple files ([#&#8203;16180](https://github.com/jestjs/jest/pull/16180)) - `[jest-haste-map]` Drop `walker` dependency; replace hand-rolled directory recursion in the JS crawler and watcher startup with `fdir` ([#&#8203;16187](https://github.com/jestjs/jest/pull/16187)) - `[jest-haste-map]` Reuse cached metadata for files whose haste name is a known duplicate, instead of re-reading and re-parsing them on every startup ([#&#8203;16351](https://github.com/jestjs/jest/pull/16351)) - `[jest-haste-map]` Cache the watchman socket path and replace the `watchman --version` probe with `get-sockname`, so warm runs spawn no watchman processes ([#&#8203;16386](https://github.com/jestjs/jest/pull/16386)) - `[jest-resolve]` Store the per-directory package-type lookup in the cache it reads, so it actually memoizes ([#&#8203;16369](https://github.com/jestjs/jest/pull/16369)) - `[jest-resolve, jest-runtime]` Cut repeated work on the resolution hot path: hoist the platform-extension list to construction, memoize `isCoreModule` and the options cache-key serialization, skip mapper preparation when no `moduleNameMapper` is configured, run each mapper regex once, and stop re-parsing `NODE_OPTIONS` on every default-resolver call ([#&#8203;16371](https://github.com/jestjs/jest/pull/16371)) - `[jest-resolve]` Cut warm resolution cost to about a third: reuse one `unrs-resolver` factory per options shape instead of cloning per resolution, compose the factory cache key from per-array cached strings instead of serializing options, and stop constructing an `Error` for misses that `findNodeModule` swallows; add a `__benchmarks__` suite for the default resolver ([#&#8203;16373](https://github.com/jestjs/jest/pull/16373)) - `[jest-runner, @&#8203;jest/source-map]` Replace `source-map-support` with an implementation in `@jest/source-map` ([#&#8203;16327](https://github.com/jestjs/jest/pull/16327)) - `[jest-snapshot]` Load babel, semver and synckit lazily, so requiring the package (which every test process does through `@jest/expect`) no longer loads \~200 modules that only writing inline snapshots needs ([#&#8203;16387](https://github.com/jestjs/jest/pull/16387)) - `[jest-runtime]` Reduce per-require overhead: skip module ID resolution when no mock can apply, answer core modules before probing for a manual mock, share one `require.cache` proxy across modules, and cache empty files ([#&#8203;16376](https://github.com/jestjs/jest/pull/16376)) - `[@jest/source-map]` Deprecate `getCallsite` in favour of `SourceMapSupport#getCallsite` ([#&#8203;16327](https://github.com/jestjs/jest/pull/16327)) - `[jest-runtime]` Avoid magical `null` value in ESM loader ([#&#8203;16160](https://github.com/jestjs/jest/pull/16160)) ### [`v30.4.2`](https://github.com/jestjs/jest/blob/HEAD/CHANGELOG.md#3042) [Compare Source](https://github.com/jestjs/jest/compare/v30.4.1...v30.4.2) ##### Fixes - `[jest-runtime]` Fix named imports from CJS modules whose `module.exports` is a function with own-property exports ([#&#8203;16150](https://github.com/jestjs/jest/pull/16150)) ### [`v30.4.1`](https://github.com/jestjs/jest/blob/HEAD/CHANGELOG.md#3041) [Compare Source](https://github.com/jestjs/jest/compare/v30.4.0...v30.4.1) ##### Features - `[jest-config, jest-core, jest-runner, jest-schemas, jest-types]` Allow custom runner configuration options via tuple format `['runner-path', {options}]` ([#&#8203;16141](https://github.com/jestjs/jest/pull/16141)) ##### Fixes - `[jest-runtime]` Align CJS-from-ESM default export with Node: `module.exports` is always the ESM default, `__esModule` unwrapping is no longer applied ([#&#8203;16143](https://github.com/jestjs/jest/pull/16143)) ### [`v30.4.0`](https://github.com/jestjs/jest/blob/HEAD/CHANGELOG.md#3040) [Compare Source](https://github.com/jestjs/jest/compare/v30.3.0...v30.4.0) ##### Features - `[babel-jest]` Support collecting coverage from `.mts`, `.cts` (and other) files ([#&#8203;15994](https://github.com/jestjs/jest/pull/15994)) - `[jest-circus, jest-cli, jest-config, jest-core, jest-jasmine2, jest-types]` Add `--collect-tests` flag to discover and list tests without executing them ([#&#8203;16006](https://github.com/jestjs/jest/pull/16006)) - `[jest-config, jest-runner, jest-worker]` Add `workerGracefulExitTimeout` config option to control how long workers are given to exit before being force-killed ([#&#8203;15984](https://github.com/jestjs/jest/pull/15984)) - `[jest-config]` Add support for `jest.config.mts` as a valid configuration file ([#&#8203;16005](https://github.com/jestjs/jest/pull/16005)) - `[jest-config, jest-core, jest-reporters, jest-runner]` `verbose` and `silent` can now be set per-project; the project-level value overrides the global value for that project's tests ([#&#8203;16133](https://github.com/jestjs/jest/pull/16133)) - `[@jest/fake-timers]` Accept `Temporal.Duration` in `jest.advanceTimersByTime()` and `jest.advanceTimersByTimeAsync()` ([#&#8203;16128](https://github.com/jestjs/jest/pull/16128)) - `[@jest/fake-timers]` Accept `Temporal.Instant` and `Temporal.ZonedDateTime` in `jest.setSystemTime()` and `useFakeTimers({now})` ([#&#8203;16128](https://github.com/jestjs/jest/pull/16128)) - `[@jest/fake-timers]` Support faking `Temporal.Now.*` ([#&#8203;16131](https://github.com/jestjs/jest/pull/16131)) - `[jest-mock]` Add `clearMocksOnScope(scope)` on `ModuleMocker` for clearing every mock function exposed on a scope object ([#&#8203;16088](https://github.com/jestjs/jest/pull/16088)) - `[jest-resolve]` Add `canResolveSync()` on `Resolver` so callers can detect when a user-configured resolver only exports an `async` hook ([#&#8203;16064](https://github.com/jestjs/jest/pull/16064)) - `[jest-runtime]` Use synchronous `evaluate()` for ES modules without top-level `await` on Node versions that support it (v24.9+), and prefer the synchronous transform path when a sync transformer is configured ([#&#8203;16062](https://github.com/jestjs/jest/pull/16062)) - `[jest-runtime]` Support `require()` of ES modules on Node v24.9+ ([#&#8203;16074](https://github.com/jestjs/jest/pull/16074)) - `[jest-runtime]` Validate TC39 import attributes (`with { type: 'json' }`) on ESM imports ([#&#8203;16127](https://github.com/jestjs/jest/pull/16127)) - `[@jest/transform]` Add `canTransformSync(filename)` on `ScriptTransformer` so callers can pick the sync vs async transform path ([#&#8203;16062](https://github.com/jestjs/jest/pull/16062)) - `[jest-util]` Add `isError` helper ([#&#8203;16076](https://github.com/jestjs/jest/pull/16076)) - `[pretty-format]` Support React 19 ([#&#8203;16123](https://github.com/jestjs/jest/pull/16123)) ##### Fixes - `[expect-utils]` Fix `toStrictEqual` failing on `structuredClone` results due to cross-realm constructor mismatch ([#&#8203;15959](https://github.com/jestjs/jest/pull/15959)) - `[@jest/expect-utils]` Prevent `toMatchObject`/subset matching from throwing when encountering exotic iterables ([#&#8203;15952](https://github.com/jestjs/jest/pull/15952)) - `[fake-timers]` Convert `Date` to milliseconds before passing to `@sinonjs/fake-timers` ([#&#8203;16029](https://github.com/jestjs/jest/pull/16029)) - `[jest]` Export `GlobalConfig` and `ProjectConfig` TypeScript types ([#&#8203;16132](https://github.com/jestjs/jest/pull/16132)) - `[jest-circus]` Prevent crash when `asyncError` is undefined for non-Error throws ([#&#8203;16003](https://github.com/jestjs/jest/pull/16003)) - `[jest-circus, jest-jasmine2]` Include `Error.cause` in JSON `failureMessages` output ([#&#8203;15967](https://github.com/jestjs/jest/pull/15967)) - `[jest-config]` Fix preset path resolution on Windows when the preset uses subpath `exports` ([#&#8203;15961](https://github.com/jestjs/jest/pull/15961)) - `[jest-config]` Allow `collectCoverage` and `coverageProvider` in project config without a validation warning ([#&#8203;16132](https://github.com/jestjs/jest/pull/16132)) - `[jest-config]` Project config validator now emits "is not supported in an individual project configuration" instead of "probably a typing mistake" for known global-only options ([#&#8203;16132](https://github.com/jestjs/jest/pull/16132)) - `[jest-environment-node]` Fix `--localstorage-file` warning on Node 25+ ([#&#8203;16086](https://github.com/jestjs/jest/pull/16086)) - `[jest-reporters]` Apply global coverage threshold to unmatched pattern files in addition to glob/path thresholds ([#&#8203;16137](https://github.com/jestjs/jest/pull/16137)) - `[jest-reporters, jest-runner, jest-runtime, jest-transform]` Fix coverage report not showing correct code coverage when using `projects` config option ([#&#8203;16140](https://github.com/jestjs/jest/pull/16140)) - `[jest-runtime]` Resolve `expect` and `@jest/expect` from the internal module registry so test-file imports share the same `JestAssertionError` as the global `expect` ([#&#8203;16130](https://github.com/jestjs/jest/pull/16130)) - `[jest-runtime]` Improve CJS-from-ESM interop: `__esModule`/Babel default unwrap, broader named-export coverage, and shared CJS singleton across importers ([#&#8203;16050](https://github.com/jestjs/jest/pull/16050)) - `[jest-runtime]` Load `.js` files with ESM syntax but no `"type":"module"` marker as native ESM ([#&#8203;16050](https://github.com/jestjs/jest/pull/16050)) - `[jest-runtime]` Extend the `.js`-with-ESM-syntax fallback to `require()` on Node v24.9+ - falls back to `require(esm)` when the CJS parser rejects ESM syntax ([#&#8203;16078](https://github.com/jestjs/jest/pull/16078)) - `[jest-runtime]` Fix deadlocks and double-evaluation in concurrent ESM and wasm imports ([#&#8203;16050](https://github.com/jestjs/jest/pull/16050)) - `[jest-runtime]` Fix error when `require()` is called after the Jest environment has been torn down ([#&#8203;15951](https://github.com/jestjs/jest/pull/15951)) - `[jest-runtime]` Fix missing error when `import()` is called after the Jest environment has been torn down ([#&#8203;16080](https://github.com/jestjs/jest/pull/16080)) - `[jest-runtime]` Fix virtual `unstable_mockModule` registrations not respected in ESM ([#&#8203;16081](https://github.com/jestjs/jest/pull/16081)) - `[jest-runtime]` Apply `moduleNameMapper` when resolving modules with `require.resolve()` and the `paths` option ([#&#8203;16135](https://github.com/jestjs/jest/pull/16135)) ##### Chore & Maintenance - `[@jest/fake-timers]` Upgrade `@sinonjs/fake-timers` ([#&#8203;16139](https://github.com/jestjs/jest/pull/16139)) - `[jest-runtime]` Use synchronous `linkRequests` / `instantiate` for ESM linking on Node v24.9+ ([#&#8203;16063](https://github.com/jestjs/jest/pull/16063)) ### [`v30.3.0`](https://github.com/jestjs/jest/blob/HEAD/CHANGELOG.md#3030) [Compare Source](https://github.com/jestjs/jest/compare/v30.2.0...v30.3.0) ##### Features - `[jest-config]` Add `defineConfig` and `mergeConfig` helpers for type-safe Jest config ([#&#8203;15844](https://github.com/jestjs/jest/pull/15844)) - `[jest-fake-timers]` Add `setTimerTickMode` to configure how timers advance - `[*]` Reduce token usage when run through LLMs ([`3f17932`](https://github.com/jestjs/jest/commit/3f17932061c0203999451e5852664093de876709)) ##### Fixes - `[jest-config]` Keep CLI coverage output when using `--json` with `--outputFile` ([#&#8203;15918](https://github.com/jestjs/jest/pull/15918)) - `[jest-mock]` Use `Symbol` from test environment ([#&#8203;15858](https://github.com/jestjs/jest/pull/15858)) - `[jest-reporters]` Fix issue where console output not displayed for GHA reporter even with `silent: false` option ([#&#8203;15864](https://github.com/jestjs/jest/pull/15864)) - `[jest-runtime]` Fix issue where user cannot utilize dynamic import despite specifying `--experimental-vm-modules` Node option ([#&#8203;15842](https://github.com/jestjs/jest/pull/15842)) - `[jest-test-sequencer]` Fix issue where failed tests due to compilation errors not getting re-executed even with `--onlyFailures` CLI option ([#&#8203;15851](https://github.com/jestjs/jest/pull/15851)) - `[jest-util]` Make sure `process.features.require_module` is `false` ([#&#8203;15867](https://github.com/jestjs/jest/pull/15867)) ##### Chore & Maintenance - `[*]` Replace remaining micromatch uses with picomatch - `[deps]` Update to sinon/fake-timers v15 - `[docs]` Update V30 migration guide to notify users on `jest.mock()` work with case-sensitive path ([#&#8203;15849](https://github.com/jestjs/jest/pull/15849)) - Updated Twitter icon to match the latest brand guidelines ([#&#8203;15869](https://github.com/jestjs/jest/pull/15869)) ### [`v30.2.0`](https://github.com/jestjs/jest/blob/HEAD/CHANGELOG.md#3020) [Compare Source](https://github.com/jestjs/jest/compare/v30.1.3...v30.2.0) ##### Chore & Maintenance - `[*]` Update example repo for testing React Native projects ([#&#8203;15832](https://github.com/jestjs/jest/pull/15832)) - `[*]` Update `jest-watch-typeahead` to v3 ([#&#8203;15830](https://github.com/jestjs/jest/pull/15830)) ### [`v30.1.3`](https://github.com/jestjs/jest/blob/HEAD/CHANGELOG.md#3013) [Compare Source](https://github.com/jestjs/jest/compare/v30.1.2...v30.1.3) ##### Fixes - Fix `unstable_mockModule` with `node:` prefixed core modules. ### [`v30.1.2`](https://github.com/jestjs/jest/blob/HEAD/CHANGELOG.md#3012) [Compare Source](https://github.com/jestjs/jest/compare/v30.1.1...v30.1.2) ##### Fixes - `[jest-snapshot-utils]` Correct snapshot header regexp to work with newline across OSes ([#&#8203;15803](https://github.com/jestjs/jest/pull/15803)) ### [`v30.1.1`](https://github.com/jestjs/jest/blob/HEAD/CHANGELOG.md#3011) [Compare Source](https://github.com/jestjs/jest/compare/v30.1.0...v30.1.1) ##### Fixes - `[jest-snapshot-utils]` Fix deprecated goo.gl snapshot warning not handling Windows end-of-line sequences ([#&#8203;15800](https://github.com/jestjs/jest/pull/15800)) - `[jest-snapshot-utils]` Improve messaging about goo.gl snapshot link change ([#&#8203;15821](https://github.com/jestjs/jest/pull/15821)) ### [`v30.1.0`](https://github.com/jestjs/jest/blob/HEAD/CHANGELOG.md#3010) [Compare Source](https://github.com/jestjs/jest/compare/v30.0.5...v30.1.0) ### [`v30.0.5`](https://github.com/jestjs/jest/blob/HEAD/CHANGELOG.md#3005) [Compare Source](https://github.com/jestjs/jest/compare/v30.0.4...v30.0.5) ##### Features - `[jest-config]` Allow `testMatch` to take a string value - `[jest-worker]` Let `workerIdleMemoryLimit` accept 0 to always restart worker child processes ##### Fixes - `[expect]` Fix `bigint` error ([#&#8203;15702](https://github.com/jestjs/jest/pull/15702)) ### [`v30.0.4`](https://github.com/jestjs/jest/blob/HEAD/CHANGELOG.md#3004) [Compare Source](https://github.com/jestjs/jest/compare/v30.0.3...v30.0.4) ##### Features - `[expect]` The `Inverse` type is now exported ([#&#8203;15714](https://github.com/jestjs/jest/pull/15714)) - `[expect]` feat: support `async functions` in `toBe` ([#&#8203;15704](https://github.com/jestjs/jest/pull/15704)) ##### Fixes - `[jest]` jest --onlyFailures --listTests now correctly lists only failed tests ([#&#8203;15700](https://github.com/jestjs/jest/issues/15700)) - `[jest-snapshot]` Handle line endings in snapshots ([#&#8203;15708](https://github.com/jestjs/jest/pull/15708)) ### [`v30.0.3`](https://github.com/jestjs/jest/blob/HEAD/CHANGELOG.md#3003) [Compare Source](https://github.com/jestjs/jest/compare/v30.0.2...v30.0.3) ##### Fixes - `[jest-config]` Fix ESM TS config loading in a CJS project ([#&#8203;15694](https://github.com/jestjs/jest/pull/15694)) - `[jest-core]` jest --onlyFailures --listTests now correctly lists only failed tests([#&#8203;15700](https://github.com/jestjs/jest/pull/15700)) ##### Features - `[jest-diff]` Show non-printable control characters to diffs ([#&#8203;15696](https://github.com/jestjs/jest/pull/15696)) ### [`v30.0.2`](https://github.com/jestjs/jest/blob/HEAD/CHANGELOG.md#3002) [Compare Source](https://github.com/jestjs/jest/compare/v30.0.1...v30.0.2) ##### Fixes - `[jest-matcher-utils]` Make 'deepCyclicCopyObject' safer by setting descriptors to a null-prototype object ([#&#8203;15689](https://github.com/jestjs/jest/pull/15689)) - `[jest-util]` Make garbage collection protection property writable ([#&#8203;15689](https://github.com/jestjs/jest/pull/15689)) ### [`v30.0.1`](https://github.com/jestjs/jest/blob/HEAD/CHANGELOG.md#3001) [Compare Source](https://github.com/jestjs/jest/compare/v30.0.0...v30.0.1) ##### Features - `[jest-resolver]` Implement the `defaultAsyncResolver` ([#&#8203;15679](https://github.com/jestjs/jest/pull/15679)) ##### Fixes - `[jest-resolver]` Resolve builtin modules correctly ([#&#8203;15683](https://github.com/jestjs/jest/pull/15683)) - `[jest-environment-node, jest-util]` Avoid setting globals cleanup protection symbol when feature is off ([#&#8203;15684](https://github.com/jestjs/jest/pull/15684)) ##### Chore & Maintenance - `[*]` Remove and deprecate `jest-repl` package ([#&#8203;15673](https://github.com/jestjs/jest/pull/15673)) - `[jest-resolver]` Replace custom `isBuiltinModule` with node's `isBuiltin` ([#&#8203;15685](https://github.com/jestjs/jest/pull/15685)) ### [`v30.0.0`](https://github.com/jestjs/jest/blob/HEAD/CHANGELOG.md#3000) [Compare Source](https://github.com/jestjs/jest/compare/v29.7.0...v30.0.0) ##### Features - `[*]` Renamed `globalsCleanupMode` to `globalsCleanup` and `--waitNextEventLoopTurnForUnhandledRejectionEvents` to `--waitForUnhandledRejections` - `[expect]` Add `ArrayOf` asymmetric matcher for validating array elements. ([#&#8203;15567](https://github.com/jestjs/jest/pull/15567)) - `[babel-jest]` Add option `excludeJestPreset` to allow opting out of `babel-preset-jest` ([#&#8203;15164](https://github.com/jestjs/jest/pull/15164)) - `[expect]` Revert [#&#8203;15038](https://github.com/jestjs/jest/pull/15038) to fix `expect(fn).toHaveBeenCalledWith(expect.objectContaining(...))` when there are multiple calls ([#&#8203;15508](https://github.com/jestjs/jest/pull/15508)) - `[jest-circus, jest-cli, jest-config]` Add `waitNextEventLoopTurnForUnhandledRejectionEvents` flag to minimise performance impact of correct detection of unhandled promise rejections introduced in [#&#8203;14315](https://github.com/jestjs/jest/pull/14315) ([#&#8203;14681](https://github.com/jestjs/jest/pull/14681)) - `[jest-circus]` Add a `waitBeforeRetry` option to `jest.retryTimes` ([#&#8203;14738](https://github.com/jestjs/jest/pull/14738)) - `[jest-circus]` Add a `retryImmediately` option to `jest.retryTimes` ([#&#8203;14696](https://github.com/jestjs/jest/pull/14696)) - `[jest-circus, jest-jasmine2]` Allow `setupFilesAfterEnv` to export an async function ([#&#8203;14749](https://github.com/jestjs/jest/pull/14749)) - `[jest-circus, jest-test-result]` Add `startedAt` timestamp in `TestCaseResultObject` within `onTestCaseResult` ([#&#8203;15145](https://github.com/jestjs/jest/pull/15145)) - `[jest-cli]` Export `buildArgv` ([#&#8203;15310](https://github.com/jestjs/jest/pull/15310)) - `[jest-config]` \[**BREAKING**] Add `mts` and `cts` to default `moduleFileExtensions` config ([#&#8203;14369](https://github.com/jestjs/jest/pull/14369)) - `[jest-config]` \[**BREAKING**] Update `testMatch` and `testRegex` default option for supporting `mjs`, `cjs`, `mts`, and `cts` ([#&#8203;14584](https://github.com/jestjs/jest/pull/14584)) - `[jest-config]` Loads config file from provided path in `package.json` ([#&#8203;14044](https://github.com/jestjs/jest/pull/14044)) - `[jest-config]` Allow loading `jest.config.cts` files ([#&#8203;14070](https://github.com/jestjs/jest/pull/14070)) - `[jest-config]` Show `rootDir` in error message when a `preset` fails to load ([#&#8203;15194](https://github.com/jestjs/jest/pull/15194)) - `[jest-config]` Support loading TS config files using `esbuild-register` via docblock loader ([#&#8203;15190](https://github.com/jestjs/jest/pull/15190)) - `[jest-config]` Allow passing TS config loader options via docblock comment ([#&#8203;15234](https://github.com/jestjs/jest/pull/15234)) - `[jest-config]` If Node is running with type stripping enabled, do not require a TS loader ([#&#8203;15480](https://github.com/jestjs/jest/pull/15480)) - `[@jest/core]` Group together open handles with the same stack trace ([#&#8203;13417](https://github.com/jestjs/jest/pull/13417), & [#&#8203;14789](https://github.com/jestjs/jest/pull/14789)) - `[@jest/core]` Add `perfStats` to surface test setup overhead ([#&#8203;14622](https://github.com/jestjs/jest/pull/14622)) - `[@jest/core]` \[**BREAKING**] Changed `--filter` to accept an object with shape `{ filtered: Array<string> }` to match [documentation](https://jestjs.io/docs/cli#--filterfile) ([#&#8203;13319](https://github.com/jestjs/jest/pull/13319)) - `[@jest/core]` Support `--outputFile` option for [`--listTests`](https://jestjs.io/docs/cli#--listtests) ([#&#8203;14980](https://github.com/jestjs/jest/pull/14980)) - `[@jest/core]` Stringify Errors properly with `--json` flag ([#&#8203;15329](https://github.com/jestjs/jest/pull/15329)) - `[@jest/core, @&#8203;jest/test-sequencer]` \[**BREAKING**] Exposes `globalConfig` & `contexts` to `TestSequencer` ([#&#8203;14535](https://github.com/jestjs/jest/pull/14535), & [#&#8203;14543](https://github.com/jestjs/jest/pull/14543)) - `[jest-each]` Introduce `%$` option to add number of the test to its title ([#&#8203;14710](https://github.com/jestjs/jest/pull/14710)) - `[@jest/environment]` \[**BREAKING**] Remove deprecated `jest.genMockFromModule()` ([#&#8203;15042](https://github.com/jestjs/jest/pull/15042)) - `[@jest/environment]` \[**BREAKING**] Remove unnecessary defensive code ([#&#8203;15045](https://github.com/jestjs/jest/pull/15045)) - `[jest-environment-jsdom]` \[**BREAKING**] Upgrade JSDOM to v22 ([#&#8203;13825](https://github.com/jestjs/jest/pull/13825)) - `[@jest/environment-jsdom-abstract]` Introduce new package which abstracts over the `jsdom` environment, allowing usage of custom versions of JSDOM ([#&#8203;14717](https://github.com/jestjs/jest/pull/14717)) - `[jest-environment-node]` Update jest environment with dispose symbols `Symbol` ([#&#8203;14888](https://github.com/jestjs/jest/pull/14888) & [#&#8203;14909](https://github.com/jestjs/jest/pull/14909)) - `[expect, @&#8203;jest/expect]` \[**BREAKING**] Add type inference for function parameters in `CalledWith` assertions ([#&#8203;15129](https://github.com/jestjs/jest/pull/15129)) - `[@jest/expect-utils]` Properly compare all types of `TypedArray`s ([#&#8203;15178](https://github.com/jestjs/jest/pull/15178)) - `[@jest/fake-timers]` \[**BREAKING**] Upgrade `@sinonjs/fake-timers` to v13 ([#&#8203;14544](https://github.com/jestjs/jest/pull/14544) & [#&#8203;15470](https://github.com/jestjs/jest/pull/15470)) - `[@jest/fake-timers]` Exposing new modern timers function `advanceTimersToFrame()` which advances all timers by the needed milliseconds to execute callbacks currently scheduled with `requestAnimationFrame` ([#&#8203;14598](https://github.com/jestjs/jest/pull/14598)) - `[jest-matcher-utils]` Add `SERIALIZABLE_PROPERTIES` to allow custom serialization of objects ([#&#8203;14893](https://github.com/jestjs/jest/pull/14893)) - `[jest-mock]` Add support for the Explicit Resource Management proposal to use the `using` keyword with `jest.spyOn(object, methodName)` ([#&#8203;14895](https://github.com/jestjs/jest/pull/14895)) - `[jest-reporters]` Add support for [DEC mode 2026](https://gist.github.com/christianparpart/d8a62cc1ab659194337d73e399004036) ([#&#8203;15008](https://github.com/jestjs/jest/pull/15008)) - `[jest-resolver]` Support `file://` URLs as paths ([#&#8203;15154](https://github.com/jestjs/jest/pull/15154)) - `[jest-resolve,jest-runtime,jest-resolve-dependencies]` Pass the conditions when resolving stub modules ([#&#8203;15489](https://github.com/jestjs/jest/pull/15489)) - `[jest-runtime]` Exposing new modern timers function `jest.advanceTimersToFrame()` from `@jest/fake-timers` ([#&#8203;14598](https://github.com/jestjs/jest/pull/14598)) - `[jest-runtime]` Support `import.meta.filename` and `import.meta.dirname` (available from [Node 20.11](https://nodejs.org/en/blog/release/v20.11.0)) ([#&#8203;14854](https://github.com/jestjs/jest/pull/14854)) - `[jest-runtime]` Support `import.meta.resolve` ([#&#8203;14930](https://github.com/jestjs/jest/pull/14930)) - `[jest-runtime]` \[**BREAKING**] Make it mandatory to pass `globalConfig` to the `Runtime` constructor ([#&#8203;15044](https://github.com/jestjs/jest/pull/15044)) - `[jest-runtime]` Add `unstable_unmockModule` ([#&#8203;15080](https://github.com/jestjs/jest/pull/15080)) - `[jest-runtime]` Add `onGenerateMock` transformer callback for auto generated callbacks ([#&#8203;15433](https://github.com/jestjs/jest/pull/15433) & [#&#8203;15482](https://github.com/jestjs/jest/pull/15482)) - `[jest-runtime]` \[**BREAKING**] Use `vm.compileFunction` over `vm.Script` ([#&#8203;15461](https://github.com/jestjs/jest/pull/15461)) - `[@jest/schemas]` Upgrade `@sinclair/typebox` to v0.34 ([#&#8203;15450](https://github.com/jestjs/jest/pull/15450)) - `[@jest/types]` `test.each()`: Accept a readonly (`as const`) table properly ([#&#8203;14565](https://github.com/jestjs/jest/pull/14565)) - `[@jest/types]` Improve argument type inference passed to `test` and `describe` callback functions from `each` tables ([#&#8203;14920](https://github.com/jestjs/jest/pull/14920)) - `[jest-snapshot]` \[**BREAKING**] Add support for [Error causes](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Error/cause) in snapshots ([#&#8203;13965](https://github.com/jestjs/jest/pull/13965)) - `[jest-snapshot]` Support Prettier 3 ([#&#8203;14566](https://github.com/jestjs/jest/pull/14566)) - `[@jest/util-snapshot]` Extract utils used by tooling from `jest-snapshot` into its own package ([#&#8203;15095](https://github.com/jestjs/jest/pull/15095)) - `[pretty-format]` \[**BREAKING**] Do not render empty string children (`''`) in React plugin ([#&#8203;14470](https://github.com/jestjs/jest/pull/14470)) ##### Fixes - `[expect]` Show `AggregateError` to display ([#&#8203;15346](https://github.com/jestjs/jest/pull/15346)) - `[*]` Replace `exit` with `exit-x` ([#&#8203;15399](https://github.com/jestjs/jest/pull/15399)) - `[babel-plugin-jest-hoist]` Use `denylist` instead of the deprecated `blacklist` for Babel 8 support ([#&#8203;14109](https://github.com/jestjs/jest/pull/14109)) - `[babel-plugin-jest-hoist]` Do not rely on buggy Babel behaviour ([#&#8203;15415](https://github.com/jestjs/jest/pull/15415)) - `[expect]` Check error instance type for `toThrow/toThrowError` ([#&#8203;14576](https://github.com/jestjs/jest/pull/14576)) - `[expect]` Improve diff for failing `expect.objectContaining` ([#&#8203;15038](https://github.com/jestjs/jest/pull/15038)) - `[expect]` Use `Array.isArray` to check if an array is an `Array` ([#&#8203;15101](https://github.com/jestjs/jest/pull/15101)) - `[expect]` Fix Error `cause` assertion errors ([#&#8203;15339](https://github.com/jestjs/jest/pull/15339)) - `[jest-changed-files]` Print underlying errors when VCS commands fail ([#&#8203;15052](https://github.com/jestjs/jest/pull/15052)) - `[jest-changed-files]` Abort `sl root` call if output resembles a steam locomotive ([#&#8203;15053](https://github.com/jestjs/jest/pull/15053)) - `[jest-circus]` \[**BREAKING**] Prevent false test failures caused by promise rejections handled asynchronously ([#&#8203;14315](https://github.com/jestjs/jest/pull/14315)) - `[jest-circus]` Replace recursive `makeTestResults` implementation with iterative one ([#&#8203;14760](https://github.com/jestjs/jest/pull/14760)) - `[jest-circus]` Omit `expect.hasAssertions()` errors if a test already has errors ([#&#8203;14866](https://github.com/jestjs/jest/pull/14866)) - `[jest-circus, jest-expect, jest-snapshot]` Pass `test.failing` tests when containing failing snapshot matchers ([#&#8203;14313](https://github.com/jestjs/jest/pull/14313)) - `[jest-circus]` Concurrent tests now emit jest circus events at the correct point and in the expected order. ([#&#8203;15381](https://github.com/jestjs/jest/pull/15381)) - `[jest-cli]` \[**BREAKING**] Validate CLI flags that require arguments receives them ([#&#8203;14783](https://github.com/jestjs/jest/pull/14783)) - `[jest-config]` Make sure to respect `runInBand` option ([#&#8203;14578](https://github.com/jestjs/jest/pull/14578)) - `[jest-config]` Support `testTimeout` in project config ([#&#8203;14697](https://github.com/jestjs/jest/pull/14697)) - `[jest-config]` Support `coverageReporters` in project config ([#&#8203;14830](https://github.com/jestjs/jest/pull/14830)) - `[jest-config]` Allow `reporters` in project config ([#&#8203;14768](https://github.com/jestjs/jest/pull/14768)) - `[jest-config]` Allow Node16/NodeNext/Bundler `moduleResolution` in project's tsconfig ([#&#8203;14739](https://github.com/jestjs/jest/pull/14739)) - `[@jest/create-cache-key-function]` Correct the return type of `createCacheKey` ([#&#8203;15159](https://github.com/jestjs/jest/pull/15159)) - `[jest-each]` Allow `$keypath` templates with `null` or `undefined` values ([#&#8203;14831](https://github.com/jestjs/jest/pull/14831)) - `[@jest/expect-utils]` Fix comparison of `DataView` ([#&#8203;14408](https://github.com/jestjs/jest/pull/14408)) - `[@jest/expect-utils]` \[**BREAKING**] exclude non-enumerable in object matching ([#&#8203;14670](https://github.com/jestjs/jest/pull/14670)) - `[@jest/expect-utils]` Fix comparison of `URL` ([#&#8203;14672](https://github.com/jestjs/jest/pull/14672)) - `[@jest/expect-utils]` Check `Symbol` properties in equality ([#&#8203;14688](https://github.com/jestjs/jest/pull/14688)) - `[@jest/expect-utils]` Catch circular references within arrays when matching objects ([#&#8203;14894](https://github.com/jestjs/jest/pull/14894)) - `[@jest/expect-utils]` Fix not addressing to Sets and Maps as objects without keys ([#&#8203;14873](https://github.com/jestjs/jest/pull/14873)) - `[jest-haste-map]` Fix errors or clobbering with multiple `hasteImplModulePath`s ([#&#8203;15522](https://github.com/jestjs/jest/pull/15522)) - `[jest-leak-detector]` Make leak-detector more aggressive when running GC ([#&#8203;14526](https://github.com/jestjs/jest/pull/14526)) - `[jest-runtime]` Properly handle re-exported native modules in ESM via CJS ([#&#8203;14589](https://github.com/jestjs/jest/pull/14589)) - `[jest-runtime]` Refactor `_importCoreModel` so required core module is consistent if modified while loading ([#&#8203;15517](https://github.com/jestjs/jest/pull/15517)) - `[jest-schemas, jest-types]` \[**BREAKING**] Fix type of `testFailureExitCode` config option([#&#8203;15232](https://github.com/jestjs/jest/pull/15232)) - `[jest-util]` Make sure `isInteractive` works in a browser ([#&#8203;14552](https://github.com/jestjs/jest/pull/14552)) - `[pretty-format]` \[**BREAKING**] Print `ArrayBuffer` and `DataView` correctly ([#&#8203;14290](https://github.com/jestjs/jest/pull/14290)) - `[pretty-format]` Fixed a bug where "anonymous custom elements" were not being printed as expected. ([#&#8203;15138](https://github.com/jestjs/jest/pull/15138)) - `[jest-cli]` When specifying paths on the command line, only match against the relative paths of the test files ([#&#8203;12519](https://github.com/jestjs/jest/pull/12519)) - \[**BREAKING**] Changes `testPathPattern` configuration option to `testPathPatterns`, which now takes a list of patterns instead of the regex. - \[**BREAKING**] `--testPathPattern` is now `--testPathPatterns` - \[**BREAKING**] Specifying `testPathPatterns` when programmatically calling `watch` must be specified as `new TestPathPatterns(patterns)`, where `TestPathPatterns` can be imported from `@jest/pattern` - `[jest-reporters, jest-runner]` Unhandled errors without stack get correctly logged to console ([#&#8203;14619](https://github.com/jestjs/jest/pull/14619)) - `[jest-util]` Always load `mjs` files with `import` ([#&#8203;15447](https://github.com/jestjs/jest/pull/15447)) - `[jest-worker]` Properly handle a circular reference error when worker tries to send an assertion fails where either the expected or actual value is circular ([#&#8203;15191](https://github.com/jestjs/jest/pull/15191)) - `[jest-worker]` Properly handle a BigInt when worker tries to send an assertion fails where either the expected or actual value is BigInt ([#&#8203;15191](https://github.com/jestjs/jest/pull/15191)) - `[expect]` Resolve issue where `ObjectContaining` matched non-object values. [#&#8203;15463](https://github.com/jestjs/jest/pull/15463). - Adds a `conditional/check` to ensure the argument passed to `expect` is an object. - Add unit tests for new `ObjectContaining` behavior. - Remove `invalid/wrong` test case assertions for `ObjectContaining`. - `[jest-worker]` Addresses incorrect state on exit ([#&#8203;15610](https://github.com/jestjs/jest/pull/15610)) ##### Performance - `[*]` \[**BREAKING**] Bundle all of Jest's modules into `index.js` ([#&#8203;12348](https://github.com/jestjs/jest/pull/12348), [#&#8203;14550](https://github.com/jestjs/jest/pull/14550) & [#&#8203;14661](https://github.com/jestjs/jest/pull/14661)) - `[jest-haste-map]` Only spawn one process to check for `watchman` installation ([#&#8203;14826](https://github.com/jestjs/jest/pull/14826)) - `[jest-runner]` Better cleanup `source-map-support` after test to resolve (minor) memory leak ([#&#8203;15233](https://github.com/jestjs/jest/pull/15233)) - `[jest-resolver]` Migrate `resolve` and `resolve.exports` to `unrs-resolver` ([#&#8203;15619](https://github.com/jestjs/jest/pull/15619)) - `[jest-circus, jest-environment-node, jest-repl, jest-runner, jest-util]` Cleanup global variables on environment teardown to reduce memory leaks ([#&#8203;15215](https://github.com/jestjs/jest/pull/15215) & [#&#8203;15636](https://github.com/jestjs/jest/pull/15636) & [#&#8203;15643](https://github.com/jestjs/jest/pull/15643)) ##### Chore & Maintenance - `[jest-environment-jsdom, jest-environment-jsdom-abstract]` Increased version of jsdom to `^26.0.0` ([#&#8203;15473](https://github.com/jestjs/jest/pull/15473)) - `[*]` Increase version of `micromatch` to `^4.0.7` ([#&#8203;15082](https://github.com/jestjs/jest/pull/15082)) - `[*]` \[**BREAKING**] Drop support for Node.js versions 14, 16, 19, 21 and 23 ([#&#8203;14460](https://github.com/jestjs/jest/pull/14460), [#&#8203;15118](https://github.com/jestjs/jest/pull/15118), [#&#8203;15623](https://github.com/jestjs/jest/pull/15623), [#&#8203;15640](https://github.com/jestjs/jest/pull/15640)) - `[*]` \[**BREAKING**] Drop support for `typescript@4.3`, minimum version is now `5.4` ([#&#8203;14542](https://github.com/jestjs/jest/pull/14542), [#&#8203;15621](https://github.com/jestjs/jest/pull/15621)) - `[*]` Depend on exact versions of monorepo dependencies instead of `^` range ([#&#8203;14553](https://github.com/jestjs/jest/pull/14553)) - `[*]` \[**BREAKING**] Add ESM wrapper for all of Jest's modules ([#&#8203;14661](https://github.com/jestjs/jest/pull/14661)) - `[*]` \[**BREAKING**] Upgrade to `glob@10` ([#&#8203;14509](https://github.com/jestjs/jest/pull/14509)) - `[*]` Use `TypeError` over `Error` where appropriate ([#&#8203;14799](https://github.com/jestjs/jest/pull/14799)) - `[docs]` Fix typos in `CHANGELOG.md` and `packages/jest-validate/README.md` ([#&#8203;14640](https://github.com/jestjs/jest/pull/14640)) - `[docs]` Don't use alias matchers in docs ([#&#8203;14631](https://github.com/jestjs/jest/pull/14631)) - `[babel-jest, babel-preset-jest]` \[**BREAKING**] Increase peer dependency of `@babel/core` to `^7.11` ([#&#8203;14109](https://github.com/jestjs/jest/pull/14109)) - `[babel-jest, @&#8203;jest/transform]` Update `babel-plugin-istanbul` to v6 ([#&#8203;15156](https://github.com/jestjs/jest/pull/15156)) - `[babel-plugin-jest-hoist]` Move unnecessary `dependencies` to `devDependencies` ([#&#8203;15010](https://github.com/jestjs/jest/pull/15010)) - `[expect]` \[**BREAKING**] Remove `.toBeCalled()`, `.toBeCalledTimes()`, `.toBeCalledWith()`, `.lastCalledWith()`, `.nthCalledWith()`, `.toReturn()`, `.toReturnTimes()`, `.toReturnWith()`, `.lastReturnedWith()`, `.nthReturnedWith()` and `.toThrowError()` matcher aliases ([#&#8203;14632](https://github.com/jestjs/jest/pull/14632)) - `[jest-cli, jest-config, @&#8203;jest/types]` \[**BREAKING**] Remove deprecated `--init` argument ([#&#8203;14490](https://github.com/jestjs/jest/pull/14490)) - `[jest-config, @&#8203;jest/core, jest-util]` Upgrade `ci-info` ([#&#8203;14655](https://github.com/jestjs/jest/pull/14655)) - `[jest-mock]` \[**BREAKING**] Remove `MockFunctionMetadataType`, `MockFunctionMetadata` and `SpyInstance` types ([#&#8203;14621](https://github.com/jestjs/jest/pull/14621)) - `[@jest/reporters]` Upgrade `istanbul-lib-source-maps` ([#&#8203;14924](https://github.com/jestjs/jest/pull/14924)) - `[jest-schemas]` Upgrade `@sinclair/typebox` ([#&#8203;14775](https://github.com/jestjs/jest/pull/14775)) - `[jest-transform]` Upgrade `write-file-atomic` ([#&#8203;14274](https://github.com/jestjs/jest/pull/14274)) - `[jest-util]` Upgrade `picomatch` to v4 ([#&#8203;14653](https://github.com/jestjs/jest/pull/14653) & [#&#8203;14885](https://github.com/jestjs/jest/pull/14885)) - `[docs] Append to NODE_OPTIONS, not overwrite ([#&#8203;14730](https://github.com/jestjs/jest/pull/14730))` - `[docs]` Updated `.toHaveBeenCalled()` documentation to correctly reflect its functionality ([#&#8203;14842](https://github.com/jestjs/jest/pull/14842)) - `[docs]` Link NestJS documentation on testing with Jest ([#&#8203;14940](https://github.com/jestjs/jest/pull/14940)) - `[docs]` `Revised documentation for .toHaveBeenCalled()` to accurately depict its functionality. ([#&#8203;14853](https://github.com/jestjs/jest/pull/14853)) - `[docs]` Removed ExpressJS reference link from documentation due to dead link ([#&#8203;15270](https://github.com/jestjs/jest/pull/15270)) - `[docs]` Correct broken links in docs ([#&#8203;15359](https://github.com/jestjs/jest/pull/15359)) </details> --- ### Configuration 📅 **Schedule**: Branch creation - At any time (no schedule defined), Automerge - At any time (no schedule defined). 🚦 **Automerge**: Disabled by config. Please merge this manually once you are satisfied. ♻ **Rebasing**: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox. 🔕 **Ignore**: Close this PR and you won't be reminded about these updates again. --- - [ ] <!-- rebase-check -->If you want to rebase/retry this PR, check this box --- This PR has been generated by [Renovate Bot](https://github.com/renovatebot/renovate). <!--renovate-debug:eyJjcmVhdGVkSW5WZXIiOiI0MC41Ny4wIiwidXBkYXRlZEluVmVyIjoiNDIuNTIuOCIsInRhcmdldEJyYW5jaCI6Im1hc3RlciIsImxhYmVscyI6WyJyZW5vdmF0ZS1ib3QiXX0=-->
Author
Member

⚠️ Artifact update problem

Renovate failed to update an artifact related to this branch. You probably do not want to merge this PR as-is.

♻ Renovate will retry this branch, including artifacts, only when one of the following happens:

  • any of the package files in this branch needs updating, or
  • the branch becomes conflicted, or
  • you click the rebase/retry checkbox if found above, or
  • you rename this PR's title to start with "rebase!" to trigger it manually

The artifact failure details are included below:

File name: yarn.lock
Unknown Syntax Error: Unsupported option name ("--ignore-platform").

$ yarn install [--json] [--immutable] [--immutable-cache] [--refresh-lockfile] [--check-cache] [--check-resolutions] [--inline-builds] [--mode #0]

### ⚠️ Artifact update problem Renovate failed to update an artifact related to this branch. You probably do not want to merge this PR as-is. ♻ Renovate will retry this branch, including artifacts, only when one of the following happens: - any of the package files in this branch needs updating, or - the branch becomes conflicted, or - you click the rebase/retry checkbox if found above, or - you rename this PR's title to start with "rebase!" to trigger it manually The artifact failure details are included below: ##### File name: yarn.lock ``` Unknown Syntax Error: Unsupported option name ("--ignore-platform"). $ yarn install [--json] [--immutable] [--immutable-cache] [--refresh-lockfile] [--check-cache] [--check-resolutions] [--inline-builds] [--mode #0] ```
renovate-bot force-pushed renovate/major-jest-monorepo from 1513002e9f
Some checks failed
renovate/artifacts Artifact file update failure
to c7415a7e8c
Some checks failed
renovate/artifacts Artifact file update failure
2025-06-23 05:27:06 +05:30
Compare
renovate-bot changed title from chore(deps): update dependency jest to v30 to chore(deps): update jest monorepo to v30 (major) 2025-06-23 05:27:11 +05:30
renovate-bot force-pushed renovate/major-jest-monorepo from c7415a7e8c
Some checks failed
renovate/artifacts Artifact file update failure
to 4cd18f7f23
Some checks failed
renovate/artifacts Artifact file update failure
ci/woodpecker/push/woodpecker Pipeline was successful
ci/woodpecker/pr/woodpecker Pipeline was successful
ci/woodpecker/pull_request_metadata/woodpecker Pipeline was successful
2025-10-02 13:30:44 +05:30
Compare
renovate-bot force-pushed renovate/major-jest-monorepo from 4cd18f7f23
Some checks failed
renovate/artifacts Artifact file update failure
ci/woodpecker/push/woodpecker Pipeline was successful
ci/woodpecker/pr/woodpecker Pipeline was successful
ci/woodpecker/pull_request_metadata/woodpecker Pipeline was successful
to 40f8734a4a
Some checks failed
renovate/artifacts Artifact file update failure
ci/woodpecker/pull_request_metadata/woodpecker Pipeline failed
ci/woodpecker/push/woodpecker Pipeline failed
ci/woodpecker/pr/woodpecker Pipeline failed
2025-10-02 13:43:46 +05:30
Compare
renovate-bot force-pushed renovate/major-jest-monorepo from 40f8734a4a
Some checks failed
renovate/artifacts Artifact file update failure
ci/woodpecker/pull_request_metadata/woodpecker Pipeline failed
ci/woodpecker/push/woodpecker Pipeline failed
ci/woodpecker/pr/woodpecker Pipeline failed
to 82a3f79f51
Some checks failed
renovate/artifacts Artifact file update failure
ci/woodpecker/pr/woodpecker Pipeline failed
ci/woodpecker/push/woodpecker Pipeline failed
ci/woodpecker/pull_request_metadata/woodpecker Pipeline failed
2025-10-04 12:40:49 +05:30
Compare
renovate-bot force-pushed renovate/major-jest-monorepo from 82a3f79f51
Some checks failed
renovate/artifacts Artifact file update failure
ci/woodpecker/pr/woodpecker Pipeline failed
ci/woodpecker/push/woodpecker Pipeline failed
ci/woodpecker/pull_request_metadata/woodpecker Pipeline failed
to b1739ab36c
Some checks failed
renovate/artifacts Artifact file update failure
ci/woodpecker/pr/woodpecker Pipeline failed
ci/woodpecker/push/woodpecker Pipeline failed
ci/woodpecker/pull_request_metadata/woodpecker Pipeline failed
2026-06-15 05:24:15 +05:30
Compare
Some checks failed
renovate/artifacts Artifact file update failure
ci/woodpecker/pr/woodpecker Pipeline failed
ci/woodpecker/push/woodpecker Pipeline failed
ci/woodpecker/pull_request_metadata/woodpecker Pipeline failed
This pull request can be merged automatically.
This branch is out-of-date with the base branch
You are not authorized to merge this pull request.
View command line instructions

Checkout

From your project repository, check out a new branch and test the changes.
git fetch -u origin renovate/major-jest-monorepo:renovate/major-jest-monorepo
git switch renovate/major-jest-monorepo

Merge

Merge the changes and update on Forgejo.

Warning: The "Autodetect manual merge" setting is not enabled for this repository, you will have to mark this pull request as manually merged afterwards.

git switch master
git merge --no-ff renovate/major-jest-monorepo
git switch renovate/major-jest-monorepo
git rebase master
git switch master
git merge --ff-only renovate/major-jest-monorepo
git switch renovate/major-jest-monorepo
git rebase master
git switch master
git merge --no-ff renovate/major-jest-monorepo
git switch master
git merge --squash renovate/major-jest-monorepo
git switch master
git merge --ff-only renovate/major-jest-monorepo
git switch master
git merge renovate/major-jest-monorepo
git push origin master
Sign in to join this conversation.
No reviewers
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set

Reference
mCaptcha/pow_sha256-polyfill!112
No description provided.