🚨 [security] Update all of jest 29.7.0 → 30.2.0 (major)
🚨 Your current dependencies have known security vulnerabilities 🚨
This dependency update fixes known security vulnerabilities. Please see the details below and assess their impact carefully. We recommend to merge and deploy this as soon as possible!
Here is everything you need to know about this upgrade. Please take a good look at what changed and the test results before merging this pull request.
What changed?
✳️ @jest/globals (29.7.0 → 30.2.0) · Repo · Changelog
Release Notes
30.2.0
Chore & Maintenance
[*]Update example repo for testing React Native projects (#15832)[*]Updatejest-watch-typeaheadto v3 (#15830)Features
[jest-environment-jsdom-abstract]Add support for JSDOM v27 (#15834)Fixes
30.1.1
Fixes
[jest-snapshot-utils]Fix deprecated goo.gl snapshot warning not handling Windows end-of-line sequences (#15800)
30.1.0
Features
[jest-leak-detector]Configurable GC aggressiveness regarding to V8 heap snapshot generation (#15793)[jest-runtime]Reduce redundant ReferenceError messages[jest-core]Include test modules that failed to load when --onlyFailures is activeFixes
- `[jest-snapshot-utils] Fix deprecated goo.gl snapshot guide link not getting replaced with fully canonical URL (#15787)
[jest-circus]Fixit.concurrentnot working withdescribe.skip(#15765)[jest-snapshot]Fix mangled inline snapshot updates when used with Prettier 3 and CRLF line endings[jest-runtime]Importing from@jest/globalsin more than one file no longer breaks relative paths (#15772)Chore
[expect]Update docblock fortoContain()to display info on substring check (#15789)
30.0.5 (from changelog)
Features
[jest-config]AllowtestMatchto take a string value[jest-worker]LetworkerIdleMemoryLimitaccept 0 to always restart worker child processesFixes
[expect]Fixbiginterror (#15702)
30.0.4 (from changelog)
Features
[expect]TheInversetype is now exported (#15714)[expect]feat: supportasync functionsintoBe(#15704)Fixes
30.0.3 (from changelog)
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)
30.0.2
What's Changed
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)Full Changelog: https://github.com/jestjs/jest/blob/main/CHANGELOG.md
30.0.1
What's Changed
Features
[jest-resolver]Implement thedefaultAsyncResolver(#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 deprecatejest-replpackage (#15673)[jest-resolver]Replace customisBuiltinModulewith node'sisBuiltin(#15685)New Contributors
Full Changelog: https://github.com/jestjs/jest/blob/main/CHANGELOG.md
30.0.0
Today we are happy to announce the release of Jest 30. This release features a substantial number of changes, fixes, and improvements. While it is one of the largest major releases of Jest ever, we admit that three years for a major release is too long. In the future, we are aiming to make more frequent major releases to keep Jest great for the next decade.
If you want to skip all the news and just get going, run
npm install jest@^30.0.0and follow the migration guide: Upgrading from Jest 29 to 30.Features
[*]RenamedglobalsCleanupModetoglobalsCleanupand--waitNextEventLoopTurnForUnhandledRejectionEventsto--waitForUnhandledRejections[expect]AddArrayOfasymmetric matcher for validating array elements. (#15567)[babel-jest]Add optionexcludeJestPresetto allow opting out ofbabel-preset-jest(#15164)[expect]Revert #15038 to fixexpect(fn).toHaveBeenCalledWith(expect.objectContaining(...))when there are multiple calls (#15508)[jest-circus, jest-cli, jest-config]AddwaitNextEventLoopTurnForUnhandledRejectionEventsflag to minimise performance impact of correct detection of unhandled promise rejections introduced in #14315 (#14681)[jest-circus]Add awaitBeforeRetryoption tojest.retryTimes(#14738)[jest-circus]Add aretryImmediatelyoption tojest.retryTimes(#14696)[jest-circus, jest-jasmine2]AllowsetupFilesAfterEnvto export an async function (#10962)[jest-circus, jest-test-result]AddstartedAttimestamp inTestCaseResultObjectwithinonTestCaseResult(#15145)[jest-cli]ExportbuildArgv(#15310)[jest-config][BREAKING] Addmtsandctsto defaultmoduleFileExtensionsconfig (#14369)[jest-config][BREAKING] UpdatetestMatchandtestRegexdefault option for supportingmjs,cjs,mts, andcts(#14584)[jest-config]Loads config file from provided path inpackage.json(#14044)[jest-config]Allow loadingjest.config.ctsfiles (#14070)[jest-config]ShowrootDirin error message when apresetfails to load (#15194)[jest-config]Support loading TS config files usingesbuild-registervia 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]AddperfStatsto surface test setup overhead (#14622)[@jest/core][BREAKING] Changed--filterto accept an object with shape{ filtered: Array<string> }to match documentation (#13319)[@jest/core]Support--outputFileoption for--listTests(#14980)[@jest/core]Stringify Errors properly with--jsonflag (#15329)[@jest/core, @jest/test-sequencer][BREAKING] ExposesglobalConfig&contextstoTestSequencer(#14535, & #14543)[jest-each]Introduce%$option to add number of the test to its title (#14710)[@jest/environment][BREAKING] Remove deprecatedjest.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 thejsdomenvironment, allowing usage of custom versions of JSDOM (#14717)[jest-environment-node]Update jest environment with dispose symbolsSymbol(#14888 & #14909)[expect, @jest/expect][BREAKING] Add type inference for function parameters inCalledWithassertions (#15129)[@jest/expect-utils]Properly compare all types ofTypedArrays (#15178)[@jest/fake-timers][BREAKING] Upgrade@sinonjs/fake-timersto v13 (#14544 & #15470)[@jest/fake-timers]Exposing new modern timers functionadvanceTimersToFrame()which advances all timers by the needed milliseconds to execute callbacks currently scheduled withrequestAnimationFrame(#14598)[jest-matcher-utils]AddSERIALIZABLE_PROPERTIESto allow custom serialization of objects (#14893)[jest-mock]Add support for the Explicit Resource Management proposal to use theusingkeyword withjest.spyOn(object, methodName)(#14895)[jest-reporters]Add support for DEC mode 2026 (#15008)[jest-resolver]Supportfile://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 functionjest.advanceTimersToFrame()from@jest/fake-timers(#14598)[jest-runtime]Supportimport.meta.filenameandimport.meta.dirname(available from Node 20.11) (#14854)[jest-runtime]Supportimport.meta.resolve(#14930)[jest-runtime][BREAKING] Make it mandatory to passglobalConfigto theRuntimeconstructor (#15044)[jest-runtime]Addunstable_unmockModule(#15080)[jest-runtime]AddonGenerateMocktransformer callback for auto generated callbacks (#15433 & #15482)[jest-runtime][BREAKING] Usevm.compileFunctionovervm.Script(#15461)[@jest/schemas]Upgrade@sinclair/typeboxto v0.34 (#15450)[@jest/types]test.each(): Accept a readonly (as const) table properly (#14565)[@jest/types]Improve argument type inference passed totestanddescribecallback functions fromeachtables (#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 fromjest-snapshotinto its own package (#15095)[pretty-format][BREAKING] Do not render empty string children ('') in React plugin (#14470)Fixes
[expect]ShowAggregateErrorto display (#15346)[*]Replaceexitwithexit-x(#15399)[babel-plugin-jest-hoist]Usedenylistinstead of the deprecatedblacklistfor Babel 8 support (#14109)[babel-plugin-jest-hoist]Do not rely on buggy Babel behaviour (#15415)[expect]Check error instance type fortoThrow/toThrowError(#14576)[expect]Improve diff for failingexpect.objectContaining(#15038)[expect]UseArray.isArrayto check if an array is anArray(#15101)[expect]Fix Errorcauseassertion errors (#15339)[jest-changed-files]Print underlying errors when VCS commands fail (#15052)[jest-changed-files]Abortsl rootcall if output resembles a steam locomotive (#15053)[jest-circus][BREAKING] Prevent false test failures caused by promise rejections handled asynchronously (#14315)[jest-circus]Replace recursivemakeTestResultsimplementation with iterative one (#14760)[jest-circus]Omitexpect.hasAssertions()errors if a test already has errors (#14866)[jest-circus, jest-expect, jest-snapshot]Passtest.failingtests 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 respectrunInBandoption (#14578)[jest-config]SupporttestTimeoutin project config (#14697)[jest-config]SupportcoverageReportersin project config (#14697)[jest-config]Allowreportersin project config (#14768)[jest-config]Allow Node16/NodeNext/BundlermoduleResolutionin project's tsconfig (#14739)[@jest/create-cache-key-function]Correct the return type ofcreateCacheKey(#15159)[jest-each]Allow$keypathtemplates withnullorundefinedvalues (#14831)[@jest/expect-utils]Fix comparison ofDataView(#14408)[@jest/expect-utils][BREAKING] exclude non-enumerable in object matching (#14670)[@jest/expect-utils]Fix comparison ofURL(#14672)[@jest/expect-utils]CheckSymbolproperties 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 multiplehasteImplModulePaths (#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_importCoreModelso required core module is consistent if modified while loading (#15077)[jest-schemas, jest-types][BREAKING] Fix type oftestFailureExitCodeconfig option(#15232)[jest-util]Make sureisInteractiveworks in a browser (#14552)[pretty-format][BREAKING] PrintArrayBufferandDataViewcorrectly (#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
testPathPatternconfiguration option totestPathPatterns, which now takes a list of patterns instead of the regex.- [BREAKING]
--testPathPatternis now--testPathPatterns- [BREAKING] Specifying
testPathPatternswhen programmatically callingwatchmust be specified asnew TestPathPatterns(patterns), whereTestPathPatternscan be imported from@jest/pattern[jest-reporters, jest-runner]Unhandled errors without stack get correctly logged to console (#14619)[jest-util]Always loadmjsfiles withimport(#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 whereObjectContainingmatched non-object values. ([#15463])(#15463).
- Adds a
conditional/checkto ensure the argument passed toexpectis an object.- Add unit tests for new
ObjectContainingbehavior.- Remove
invalid/wrongtest case assertions forObjectContaining.[jest-worker]Addresses incorrect state on exit (#15610)Performance
[*][BREAKING] Bundle all of Jest's modules intoindex.js(#12348, #14550 & #14661)[jest-haste-map]Only spawn one process to check forwatchmaninstallation (#14826)[jest-runner]Better cleanupsource-map-supportafter test to resolve (minor) memory leak (#15233)[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(#15325CVE-2024-37890)[*]Increase version ofmicromatchto^4.0.7(#15082)[*][BREAKING] Drop support for Node.js versions 14, 16, 19, 21 and 23 (#14460, #15118, #15623, #15640)[*][BREAKING] Drop support fortypescript@4.3, minimum version is now5.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 toglob@10(#14509)[*]UseTypeErroroverErrorwhere appropriate (#14799)[docs]Fix typos inCHANGELOG.mdandpackages/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/coreto^7.11(#14109)[babel-jest, @jest/transform]Updatebabel-plugin-istanbulto v6 (#15156)[babel-plugin-jest-hoist]Move unnecessarydependenciestodevDependencies(#15010)[expect][BREAKING] Remove.toBeCalled(),.toBeCalledTimes(),.toBeCalledWith(),.lastCalledWith(),.nthCalledWith(),.toReturn(),.toReturnTimes(),.toReturnWith(),.lastReturnedWith(),.nthReturnedWith()and.toThrowError()matcher aliases (#14632)[jest-cli, jest-config, @jest/types][BREAKING] Remove deprecated--initargument (#14490)[jest-config, @jest/core, jest-util]Upgradeci-info(#14655)[jest-mock][BREAKING] RemoveMockFunctionMetadataType,MockFunctionMetadataandSpyInstancetypes (#14621)[@jest/reporters]Upgradeistanbul-lib-source-maps(#14924)[jest-schemas]Upgrade@sinclair/typebox(#14775)[jest-transform]Upgradewrite-file-atomic(#14274)[jest-util]Upgradepicomatchto v4 (#14653 & #14885)[docs] Append to NODE_OPTIONS, not overwrite ([#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)See the CHANGELOG.
Does any of this look wrong? Please let us know.
Commits
See the full diff on Github. The new version differs by more commits than we can show here.
✳️ babel-jest (29.7.0 → 30.2.0) · Repo · Changelog
Release Notes
30.2.0
Chore & Maintenance
[*]Update example repo for testing React Native projects (#15832)[*]Updatejest-watch-typeaheadto v3 (#15830)Features
[jest-environment-jsdom-abstract]Add support for JSDOM v27 (#15834)Fixes
30.1.1
Fixes
[jest-snapshot-utils]Fix deprecated goo.gl snapshot warning not handling Windows end-of-line sequences (#15800)
30.1.0
Features
[jest-leak-detector]Configurable GC aggressiveness regarding to V8 heap snapshot generation (#15793)[jest-runtime]Reduce redundant ReferenceError messages[jest-core]Include test modules that failed to load when --onlyFailures is activeFixes
- `[jest-snapshot-utils] Fix deprecated goo.gl snapshot guide link not getting replaced with fully canonical URL (#15787)
[jest-circus]Fixit.concurrentnot working withdescribe.skip(#15765)[jest-snapshot]Fix mangled inline snapshot updates when used with Prettier 3 and CRLF line endings[jest-runtime]Importing from@jest/globalsin more than one file no longer breaks relative paths (#15772)Chore
[expect]Update docblock fortoContain()to display info on substring check (#15789)
30.0.5 (from changelog)
Features
[jest-config]AllowtestMatchto take a string value[jest-worker]LetworkerIdleMemoryLimitaccept 0 to always restart worker child processesFixes
[expect]Fixbiginterror (#15702)
30.0.4 (from changelog)
Features
[expect]TheInversetype is now exported (#15714)[expect]feat: supportasync functionsintoBe(#15704)Fixes
30.0.2
What's Changed
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)Full Changelog: https://github.com/jestjs/jest/blob/main/CHANGELOG.md
30.0.1
What's Changed
Features
[jest-resolver]Implement thedefaultAsyncResolver(#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 deprecatejest-replpackage (#15673)[jest-resolver]Replace customisBuiltinModulewith node'sisBuiltin(#15685)New Contributors
Full Changelog: https://github.com/jestjs/jest/blob/main/CHANGELOG.md
30.0.0
Today we are happy to announce the release of Jest 30. This release features a substantial number of changes, fixes, and improvements. While it is one of the largest major releases of Jest ever, we admit that three years for a major release is too long. In the future, we are aiming to make more frequent major releases to keep Jest great for the next decade.
If you want to skip all the news and just get going, run
npm install jest@^30.0.0and follow the migration guide: Upgrading from Jest 29 to 30.Features
[*]RenamedglobalsCleanupModetoglobalsCleanupand--waitNextEventLoopTurnForUnhandledRejectionEventsto--waitForUnhandledRejections[expect]AddArrayOfasymmetric matcher for validating array elements. (#15567)[babel-jest]Add optionexcludeJestPresetto allow opting out ofbabel-preset-jest(#15164)[expect]Revert #15038 to fixexpect(fn).toHaveBeenCalledWith(expect.objectContaining(...))when there are multiple calls (#15508)[jest-circus, jest-cli, jest-config]AddwaitNextEventLoopTurnForUnhandledRejectionEventsflag to minimise performance impact of correct detection of unhandled promise rejections introduced in #14315 (#14681)[jest-circus]Add awaitBeforeRetryoption tojest.retryTimes(#14738)[jest-circus]Add aretryImmediatelyoption tojest.retryTimes(#14696)[jest-circus, jest-jasmine2]AllowsetupFilesAfterEnvto export an async function (#10962)[jest-circus, jest-test-result]AddstartedAttimestamp inTestCaseResultObjectwithinonTestCaseResult(#15145)[jest-cli]ExportbuildArgv(#15310)[jest-config][BREAKING] Addmtsandctsto defaultmoduleFileExtensionsconfig (#14369)[jest-config][BREAKING] UpdatetestMatchandtestRegexdefault option for supportingmjs,cjs,mts, andcts(#14584)[jest-config]Loads config file from provided path inpackage.json(#14044)[jest-config]Allow loadingjest.config.ctsfiles (#14070)[jest-config]ShowrootDirin error message when apresetfails to load (#15194)[jest-config]Support loading TS config files usingesbuild-registervia 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]AddperfStatsto surface test setup overhead (#14622)[@jest/core][BREAKING] Changed--filterto accept an object with shape{ filtered: Array<string> }to match documentation (#13319)[@jest/core]Support--outputFileoption for--listTests(#14980)[@jest/core]Stringify Errors properly with--jsonflag (#15329)[@jest/core, @jest/test-sequencer][BREAKING] ExposesglobalConfig&contextstoTestSequencer(#14535, & #14543)[jest-each]Introduce%$option to add number of the test to its title (#14710)[@jest/environment][BREAKING] Remove deprecatedjest.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 thejsdomenvironment, allowing usage of custom versions of JSDOM (#14717)[jest-environment-node]Update jest environment with dispose symbolsSymbol(#14888 & #14909)[expect, @jest/expect][BREAKING] Add type inference for function parameters inCalledWithassertions (#15129)[@jest/expect-utils]Properly compare all types ofTypedArrays (#15178)[@jest/fake-timers][BREAKING] Upgrade@sinonjs/fake-timersto v13 (#14544 & #15470)[@jest/fake-timers]Exposing new modern timers functionadvanceTimersToFrame()which advances all timers by the needed milliseconds to execute callbacks currently scheduled withrequestAnimationFrame(#14598)[jest-matcher-utils]AddSERIALIZABLE_PROPERTIESto allow custom serialization of objects (#14893)[jest-mock]Add support for the Explicit Resource Management proposal to use theusingkeyword withjest.spyOn(object, methodName)(#14895)[jest-reporters]Add support for DEC mode 2026 (#15008)[jest-resolver]Supportfile://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 functionjest.advanceTimersToFrame()from@jest/fake-timers(#14598)[jest-runtime]Supportimport.meta.filenameandimport.meta.dirname(available from Node 20.11) (#14854)[jest-runtime]Supportimport.meta.resolve(#14930)[jest-runtime][BREAKING] Make it mandatory to passglobalConfigto theRuntimeconstructor (#15044)[jest-runtime]Addunstable_unmockModule(#15080)[jest-runtime]AddonGenerateMocktransformer callback for auto generated callbacks (#15433 & #15482)[jest-runtime][BREAKING] Usevm.compileFunctionovervm.Script(#15461)[@jest/schemas]Upgrade@sinclair/typeboxto v0.34 (#15450)[@jest/types]test.each(): Accept a readonly (as const) table properly (#14565)[@jest/types]Improve argument type inference passed totestanddescribecallback functions fromeachtables (#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 fromjest-snapshotinto its own package (#15095)[pretty-format][BREAKING] Do not render empty string children ('') in React plugin (#14470)Fixes
[expect]ShowAggregateErrorto display (#15346)[*]Replaceexitwithexit-x(#15399)[babel-plugin-jest-hoist]Usedenylistinstead of the deprecatedblacklistfor Babel 8 support (#14109)[babel-plugin-jest-hoist]Do not rely on buggy Babel behaviour (#15415)[expect]Check error instance type fortoThrow/toThrowError(#14576)[expect]Improve diff for failingexpect.objectContaining(#15038)[expect]UseArray.isArrayto check if an array is anArray(#15101)[expect]Fix Errorcauseassertion errors (#15339)[jest-changed-files]Print underlying errors when VCS commands fail (#15052)[jest-changed-files]Abortsl rootcall if output resembles a steam locomotive (#15053)[jest-circus][BREAKING] Prevent false test failures caused by promise rejections handled asynchronously (#14315)[jest-circus]Replace recursivemakeTestResultsimplementation with iterative one (#14760)[jest-circus]Omitexpect.hasAssertions()errors if a test already has errors (#14866)[jest-circus, jest-expect, jest-snapshot]Passtest.failingtests 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 respectrunInBandoption (#14578)[jest-config]SupporttestTimeoutin project config (#14697)[jest-config]SupportcoverageReportersin project config (#14697)[jest-config]Allowreportersin project config (#14768)[jest-config]Allow Node16/NodeNext/BundlermoduleResolutionin project's tsconfig (#14739)[@jest/create-cache-key-function]Correct the return type ofcreateCacheKey(#15159)[jest-each]Allow$keypathtemplates withnullorundefinedvalues (#14831)[@jest/expect-utils]Fix comparison ofDataView(#14408)[@jest/expect-utils][BREAKING] exclude non-enumerable in object matching (#14670)[@jest/expect-utils]Fix comparison ofURL(#14672)[@jest/expect-utils]CheckSymbolproperties 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 multiplehasteImplModulePaths (#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_importCoreModelso required core module is consistent if modified while loading (#15077)[jest-schemas, jest-types][BREAKING] Fix type oftestFailureExitCodeconfig option(#15232)[jest-util]Make sureisInteractiveworks in a browser (#14552)[pretty-format][BREAKING] PrintArrayBufferandDataViewcorrectly (#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
testPathPatternconfiguration option totestPathPatterns, which now takes a list of patterns instead of the regex.- [BREAKING]
--testPathPatternis now--testPathPatterns- [BREAKING] Specifying
testPathPatternswhen programmatically callingwatchmust be specified asnew TestPathPatterns(patterns), whereTestPathPatternscan be imported from@jest/pattern[jest-reporters, jest-runner]Unhandled errors without stack get correctly logged to console (#14619)[jest-util]Always loadmjsfiles withimport(#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 whereObjectContainingmatched non-object values. ([#15463])(#15463).
- Adds a
conditional/checkto ensure the argument passed toexpectis an object.- Add unit tests for new
ObjectContainingbehavior.- Remove
invalid/wrongtest case assertions forObjectContaining.[jest-worker]Addresses incorrect state on exit (#15610)Performance
[*][BREAKING] Bundle all of Jest's modules intoindex.js(#12348, #14550 & #14661)[jest-haste-map]Only spawn one process to check forwatchmaninstallation (#14826)[jest-runner]Better cleanupsource-map-supportafter test to resolve (minor) memory leak (#15233)[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(#15325CVE-2024-37890)[*]Increase version ofmicromatchto^4.0.7(#15082)[*][BREAKING] Drop support for Node.js versions 14, 16, 19, 21 and 23 (#14460, #15118, #15623, #15640)[*][BREAKING] Drop support fortypescript@4.3, minimum version is now5.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 toglob@10(#14509)[*]UseTypeErroroverErrorwhere appropriate (#14799)[docs]Fix typos inCHANGELOG.mdandpackages/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/coreto^7.11(#14109)[babel-jest, @jest/transform]Updatebabel-plugin-istanbulto v6 (#15156)[babel-plugin-jest-hoist]Move unnecessarydependenciestodevDependencies(#15010)[expect][BREAKING] Remove.toBeCalled(),.toBeCalledTimes(),.toBeCalledWith(),.lastCalledWith(),.nthCalledWith(),.toReturn(),.toReturnTimes(),.toReturnWith(),.lastReturnedWith(),.nthReturnedWith()and.toThrowError()matcher aliases (#14632)[jest-cli, jest-config, @jest/types][BREAKING] Remove deprecated--initargument (#14490)[jest-config, @jest/core, jest-util]Upgradeci-info(#14655)[jest-mock][BREAKING] RemoveMockFunctionMetadataType,MockFunctionMetadataandSpyInstancetypes (#14621)[@jest/reporters]Upgradeistanbul-lib-source-maps(#14924)[jest-schemas]Upgrade@sinclair/typebox(#14775)[jest-transform]Upgradewrite-file-atomic(#14274)[jest-util]Upgradepicomatchto v4 (#14653 & #14885)[docs] Append to NODE_OPTIONS, not overwrite ([#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)See the CHANGELOG.
Does any of this look wrong? Please let us know.
Commits
See the full diff on Github. The new version differs by more commits than we can show here.
✳️ jest (29.7.0 → 30.2.0) · Repo · Changelog
Release Notes
30.2.0
Chore & Maintenance
[*]Update example repo for testing React Native projects (#15832)[*]Updatejest-watch-typeaheadto v3 (#15830)Features
[jest-environment-jsdom-abstract]Add support for JSDOM v27 (#15834)Fixes
30.1.3
Fixes
- Fix
unstable_mockModulewithnode:prefixed core modules.
30.1.2 (from changelog)
Fixes
[jest-snapshot-utils]Correct snapshot header regexp to work with newline across OSes (#15803)
30.1.1
Fixes
[jest-snapshot-utils]Fix deprecated goo.gl snapshot warning not handling Windows end-of-line sequences (#15800)
30.1.0
Features
[jest-leak-detector]Configurable GC aggressiveness regarding to V8 heap snapshot generation (#15793)[jest-runtime]Reduce redundant ReferenceError messages[jest-core]Include test modules that failed to load when --onlyFailures is activeFixes
- `[jest-snapshot-utils] Fix deprecated goo.gl snapshot guide link not getting replaced with fully canonical URL (#15787)
[jest-circus]Fixit.concurrentnot working withdescribe.skip(#15765)[jest-snapshot]Fix mangled inline snapshot updates when used with Prettier 3 and CRLF line endings[jest-runtime]Importing from@jest/globalsin more than one file no longer breaks relative paths (#15772)Chore
[expect]Update docblock fortoContain()to display info on substring check (#15789)
30.0.5 (from changelog)
Features
[jest-config]AllowtestMatchto take a string value[jest-worker]LetworkerIdleMemoryLimitaccept 0 to always restart worker child processesFixes
[expect]Fixbiginterror (#15702)
30.0.4 (from changelog)
Features
[expect]TheInversetype is now exported (#15714)[expect]feat: supportasync functionsintoBe(#15704)Fixes
30.0.3 (from changelog)
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)
30.0.2
What's Changed
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)Full Changelog: https://github.com/jestjs/jest/blob/main/CHANGELOG.md
30.0.1
What's Changed
Features
[jest-resolver]Implement thedefaultAsyncResolver(#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 deprecatejest-replpackage (#15673)[jest-resolver]Replace customisBuiltinModulewith node'sisBuiltin(#15685)New Contributors
Full Changelog: https://github.com/jestjs/jest/blob/main/CHANGELOG.md
30.0.0
Today we are happy to announce the release of Jest 30. This release features a substantial number of changes, fixes, and improvements. While it is one of the largest major releases of Jest ever, we admit that three years for a major release is too long. In the future, we are aiming to make more frequent major releases to keep Jest great for the next decade.
If you want to skip all the news and just get going, run
npm install jest@^30.0.0and follow the migration guide: Upgrading from Jest 29 to 30.Features
[*]RenamedglobalsCleanupModetoglobalsCleanupand--waitNextEventLoopTurnForUnhandledRejectionEventsto--waitForUnhandledRejections[expect]AddArrayOfasymmetric matcher for validating array elements. (#15567)[babel-jest]Add optionexcludeJestPresetto allow opting out ofbabel-preset-jest(#15164)[expect]Revert #15038 to fixexpect(fn).toHaveBeenCalledWith(expect.objectContaining(...))when there are multiple calls (#15508)[jest-circus, jest-cli, jest-config]AddwaitNextEventLoopTurnForUnhandledRejectionEventsflag to minimise performance impact of correct detection of unhandled promise rejections introduced in #14315 (#14681)[jest-circus]Add awaitBeforeRetryoption tojest.retryTimes(#14738)[jest-circus]Add aretryImmediatelyoption tojest.retryTimes(#14696)[jest-circus, jest-jasmine2]AllowsetupFilesAfterEnvto export an async function (#10962)[jest-circus, jest-test-result]AddstartedAttimestamp inTestCaseResultObjectwithinonTestCaseResult(#15145)[jest-cli]ExportbuildArgv(#15310)[jest-config][BREAKING] Addmtsandctsto defaultmoduleFileExtensionsconfig (#14369)[jest-config][BREAKING] UpdatetestMatchandtestRegexdefault option for supportingmjs,cjs,mts, andcts(#14584)[jest-config]Loads config file from provided path inpackage.json(#14044)[jest-config]Allow loadingjest.config.ctsfiles (#14070)[jest-config]ShowrootDirin error message when apresetfails to load (#15194)[jest-config]Support loading TS config files usingesbuild-registervia 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]AddperfStatsto surface test setup overhead (#14622)[@jest/core][BREAKING] Changed--filterto accept an object with shape{ filtered: Array<string> }to match documentation (#13319)[@jest/core]Support--outputFileoption for--listTests(#14980)[@jest/core]Stringify Errors properly with--jsonflag (#15329)[@jest/core, @jest/test-sequencer][BREAKING] ExposesglobalConfig&contextstoTestSequencer(#14535, & #14543)[jest-each]Introduce%$option to add number of the test to its title (#14710)[@jest/environment][BREAKING] Remove deprecatedjest.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 thejsdomenvironment, allowing usage of custom versions of JSDOM (#14717)[jest-environment-node]Update jest environment with dispose symbolsSymbol(#14888 & #14909)[expect, @jest/expect][BREAKING] Add type inference for function parameters inCalledWithassertions (#15129)[@jest/expect-utils]Properly compare all types ofTypedArrays (#15178)[@jest/fake-timers][BREAKING] Upgrade@sinonjs/fake-timersto v13 (#14544 & #15470)[@jest/fake-timers]Exposing new modern timers functionadvanceTimersToFrame()which advances all timers by the needed milliseconds to execute callbacks currently scheduled withrequestAnimationFrame(#14598)[jest-matcher-utils]AddSERIALIZABLE_PROPERTIESto allow custom serialization of objects (#14893)[jest-mock]Add support for the Explicit Resource Management proposal to use theusingkeyword withjest.spyOn(object, methodName)(#14895)[jest-reporters]Add support for DEC mode 2026 (#15008)[jest-resolver]Supportfile://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 functionjest.advanceTimersToFrame()from@jest/fake-timers(#14598)[jest-runtime]Supportimport.meta.filenameandimport.meta.dirname(available from Node 20.11) (#14854)[jest-runtime]Supportimport.meta.resolve(#14930)[jest-runtime][BREAKING] Make it mandatory to passglobalConfigto theRuntimeconstructor (#15044)[jest-runtime]Addunstable_unmockModule(#15080)[jest-runtime]AddonGenerateMocktransformer callback for auto generated callbacks (#15433 & #15482)[jest-runtime][BREAKING] Usevm.compileFunctionovervm.Script(#15461)[@jest/schemas]Upgrade@sinclair/typeboxto v0.34 (#15450)[@jest/types]test.each(): Accept a readonly (as const) table properly (#14565)[@jest/types]Improve argument type inference passed totestanddescribecallback functions fromeachtables (#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 fromjest-snapshotinto its own package (#15095)[pretty-format][BREAKING] Do not render empty string children ('') in React plugin (#14470)Fixes
[expect]ShowAggregateErrorto display (#15346)[*]Replaceexitwithexit-x(#15399)[babel-plugin-jest-hoist]Usedenylistinstead of the deprecatedblacklistfor Babel 8 support (#14109)[babel-plugin-jest-hoist]Do not rely on buggy Babel behaviour (#15415)[expect]Check error instance type fortoThrow/toThrowError(#14576)[expect]Improve diff for failingexpect.objectContaining(#15038)[expect]UseArray.isArrayto check if an array is anArray(#15101)[expect]Fix Errorcauseassertion errors (#15339)[jest-changed-files]Print underlying errors when VCS commands fail (#15052)[jest-changed-files]Abortsl rootcall if output resembles a steam locomotive (#15053)[jest-circus][BREAKING] Prevent false test failures caused by promise rejections handled asynchronously (#14315)[jest-circus]Replace recursivemakeTestResultsimplementation with iterative one (#14760)[jest-circus]Omitexpect.hasAssertions()errors if a test already has errors (#14866)[jest-circus, jest-expect, jest-snapshot]Passtest.failingtests 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 respectrunInBandoption (#14578)[jest-config]SupporttestTimeoutin project config (#14697)[jest-config]SupportcoverageReportersin project config (#14697)[jest-config]Allowreportersin project config (#14768)[jest-config]Allow Node16/NodeNext/BundlermoduleResolutionin project's tsconfig (#14739)[@jest/create-cache-key-function]Correct the return type ofcreateCacheKey(#15159)[jest-each]Allow$keypathtemplates withnullorundefinedvalues (#14831)[@jest/expect-utils]Fix comparison ofDataView(#14408)[@jest/expect-utils][BREAKING] exclude non-enumerable in object matching (#14670)[@jest/expect-utils]Fix comparison ofURL(#14672)[@jest/expect-utils]CheckSymbolproperties 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 multiplehasteImplModulePaths (#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_importCoreModelso required core module is consistent if modified while loading (#15077)[jest-schemas, jest-types][BREAKING] Fix type oftestFailureExitCodeconfig option(#15232)[jest-util]Make sureisInteractiveworks in a browser (#14552)[pretty-format][BREAKING] PrintArrayBufferandDataViewcorrectly (#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
testPathPatternconfiguration option totestPathPatterns, which now takes a list of patterns instead of the regex.- [BREAKING]
--testPathPatternis now--testPathPatterns- [BREAKING] Specifying
testPathPatternswhen programmatically callingwatchmust be specified asnew TestPathPatterns(patterns), whereTestPathPatternscan be imported from@jest/pattern[jest-reporters, jest-runner]Unhandled errors without stack get correctly logged to console (#14619)[jest-util]Always loadmjsfiles withimport(#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 whereObjectContainingmatched non-object values. ([#15463])(#15463).
- Adds a
conditional/checkto ensure the argument passed toexpectis an object.- Add unit tests for new
ObjectContainingbehavior.- Remove
invalid/wrongtest case assertions forObjectContaining.[jest-worker]Addresses incorrect state on exit (#15610)Performance
[*][BREAKING] Bundle all of Jest's modules intoindex.js(#12348, #14550 & #14661)[jest-haste-map]Only spawn one process to check forwatchmaninstallation (#14826)[jest-runner]Better cleanupsource-map-supportafter test to resolve (minor) memory leak (#15233)[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(#15325CVE-2024-37890)[*]Increase version ofmicromatchto^4.0.7(#15082)[*][BREAKING] Drop support for Node.js versions 14, 16, 19, 21 and 23 (#14460, #15118, #15623, #15640)[*][BREAKING] Drop support fortypescript@4.3, minimum version is now5.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 toglob@10(#14509)[*]UseTypeErroroverErrorwhere appropriate (#14799)[docs]Fix typos inCHANGELOG.mdandpackages/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/coreto^7.11(#14109)[babel-jest, @jest/transform]Updatebabel-plugin-istanbulto v6 (#15156)[babel-plugin-jest-hoist]Move unnecessarydependenciestodevDependencies(#15010)[expect][BREAKING] Remove.toBeCalled(),.toBeCalledTimes(),.toBeCalledWith(),.lastCalledWith(),.nthCalledWith(),.toReturn(),.toReturnTimes(),.toReturnWith(),.lastReturnedWith(),.nthReturnedWith()and.toThrowError()matcher aliases (#14632)[jest-cli, jest-config, @jest/types][BREAKING] Remove deprecated--initargument (#14490)[jest-config, @jest/core, jest-util]Upgradeci-info(#14655)[jest-mock][BREAKING] RemoveMockFunctionMetadataType,MockFunctionMetadataandSpyInstancetypes (#14621)[@jest/reporters]Upgradeistanbul-lib-source-maps(#14924)[jest-schemas]Upgrade@sinclair/typebox(#14775)[jest-transform]Upgradewrite-file-atomic(#14274)[jest-util]Upgradepicomatchto v4 (#14653 & #14885)[docs] Append to NODE_OPTIONS, not overwrite ([#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)See the CHANGELOG.
Does any of this look wrong? Please let us know.
Commits
See the full diff on Github. The new version differs by more commits than we can show here.
↗️ @jest/console (indirect, 29.7.0 → 30.2.0) · Repo · Changelog
Release Notes
30.2.0
Chore & Maintenance
[*]Update example repo for testing React Native projects (#15832)[*]Updatejest-watch-typeaheadto v3 (#15830)Features
[jest-environment-jsdom-abstract]Add support for JSDOM v27 (#15834)Fixes
30.1.1
Fixes
[jest-snapshot-utils]Fix deprecated goo.gl snapshot warning not handling Windows end-of-line sequences (#15800)
30.1.0
Features
[jest-leak-detector]Configurable GC aggressiveness regarding to V8 heap snapshot generation (#15793)[jest-runtime]Reduce redundant ReferenceError messages[jest-core]Include test modules that failed to load when --onlyFailures is activeFixes
- `[jest-snapshot-utils] Fix deprecated goo.gl snapshot guide link not getting replaced with fully canonical URL (#15787)
[jest-circus]Fixit.concurrentnot working withdescribe.skip(#15765)[jest-snapshot]Fix mangled inline snapshot updates when used with Prettier 3 and CRLF line endings[jest-runtime]Importing from@jest/globalsin more than one file no longer breaks relative paths (#15772)Chore
[expect]Update docblock fortoContain()to display info on substring check (#15789)
30.0.5 (from changelog)
Features
[jest-config]AllowtestMatchto take a string value[jest-worker]LetworkerIdleMemoryLimitaccept 0 to always restart worker child processesFixes
[expect]Fixbiginterror (#15702)
30.0.4 (from changelog)
Features
[expect]TheInversetype is now exported (#15714)[expect]feat: supportasync functionsintoBe(#15704)Fixes
30.0.2
What's Changed
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)Full Changelog: https://github.com/jestjs/jest/blob/main/CHANGELOG.md
30.0.1
What's Changed
Features
[jest-resolver]Implement thedefaultAsyncResolver(#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 deprecatejest-replpackage (#15673)[jest-resolver]Replace customisBuiltinModulewith node'sisBuiltin(#15685)New Contributors
Full Changelog: https://github.com/jestjs/jest/blob/main/CHANGELOG.md
30.0.0
Today we are happy to announce the release of Jest 30. This release features a substantial number of changes, fixes, and improvements. While it is one of the largest major releases of Jest ever, we admit that three years for a major release is too long. In the future, we are aiming to make more frequent major releases to keep Jest great for the next decade.
If you want to skip all the news and just get going, run
npm install jest@^30.0.0and follow the migration guide: Upgrading from Jest 29 to 30.Features
[*]RenamedglobalsCleanupModetoglobalsCleanupand--waitNextEventLoopTurnForUnhandledRejectionEventsto--waitForUnhandledRejections[expect]AddArrayOfasymmetric matcher for validating array elements. (#15567)[babel-jest]Add optionexcludeJestPresetto allow opting out ofbabel-preset-jest(#15164)[expect]Revert #15038 to fixexpect(fn).toHaveBeenCalledWith(expect.objectContaining(...))when there are multiple calls (#15508)[jest-circus, jest-cli, jest-config]AddwaitNextEventLoopTurnForUnhandledRejectionEventsflag to minimise performance impact of correct detection of unhandled promise rejections introduced in #14315 (#14681)[jest-circus]Add awaitBeforeRetryoption tojest.retryTimes(#14738)[jest-circus]Add aretryImmediatelyoption tojest.retryTimes(#14696)[jest-circus, jest-jasmine2]AllowsetupFilesAfterEnvto export an async function (#10962)[jest-circus, jest-test-result]AddstartedAttimestamp inTestCaseResultObjectwithinonTestCaseResult(#15145)[jest-cli]ExportbuildArgv(#15310)[jest-config][BREAKING] Addmtsandctsto defaultmoduleFileExtensionsconfig (#14369)[jest-config][BREAKING] UpdatetestMatchandtestRegexdefault option for supportingmjs,cjs,mts, andcts(#14584)[jest-config]Loads config file from provided path inpackage.json(#14044)[jest-config]Allow loadingjest.config.ctsfiles (#14070)[jest-config]ShowrootDirin error message when apresetfails to load (#15194)[jest-config]Support loading TS config files usingesbuild-registervia 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]AddperfStatsto surface test setup overhead (#14622)[@jest/core][BREAKING] Changed--filterto accept an object with shape{ filtered: Array<string> }to match documentation (#13319)[@jest/core]Support--outputFileoption for--listTests(#14980)[@jest/core]Stringify Errors properly with--jsonflag (#15329)[@jest/core, @jest/test-sequencer][BREAKING] ExposesglobalConfig&contextstoTestSequencer(#14535, & #14543)[jest-each]Introduce%$option to add number of the test to its title (#14710)[@jest/environment][BREAKING] Remove deprecatedjest.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 thejsdomenvironment, allowing usage of custom versions of JSDOM (#14717)[jest-environment-node]Update jest environment with dispose symbolsSymbol(#14888 & #14909)[expect, @jest/expect][BREAKING] Add type inference for function parameters inCalledWithassertions (#15129)[@jest/expect-utils]Properly compare all types ofTypedArrays (#15178)[@jest/fake-timers][BREAKING] Upgrade@sinonjs/fake-timersto v13 (#14544 & #15470)[@jest/fake-timers]Exposing new modern timers functionadvanceTimersToFrame()which advances all timers by the needed milliseconds to execute callbacks currently scheduled withrequestAnimationFrame(#14598)[jest-matcher-utils]AddSERIALIZABLE_PROPERTIESto allow custom serialization of objects (#14893)[jest-mock]Add support for the Explicit Resource Management proposal to use theusingkeyword withjest.spyOn(object, methodName)(#14895)[jest-reporters]Add support for DEC mode 2026 (#15008)[jest-resolver]Supportfile://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 functionjest.advanceTimersToFrame()from@jest/fake-timers(#14598)[jest-runtime]Supportimport.meta.filenameandimport.meta.dirname(available from Node 20.11) (#14854)[jest-runtime]Supportimport.meta.resolve(#14930)[jest-runtime][BREAKING] Make it mandatory to passglobalConfigto theRuntimeconstructor (#15044)[jest-runtime]Addunstable_unmockModule(#15080)[jest-runtime]AddonGenerateMocktransformer callback for auto generated callbacks (#15433 & #15482)[jest-runtime][BREAKING] Usevm.compileFunctionovervm.Script(#15461)[@jest/schemas]Upgrade@sinclair/typeboxto v0.34 (#15450)[@jest/types]test.each(): Accept a readonly (as const) table properly (#14565)[@jest/types]Improve argument type inference passed totestanddescribecallback functions fromeachtables (#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 fromjest-snapshotinto its own package (#15095)[pretty-format][BREAKING] Do not render empty string children ('') in React plugin (#14470)Fixes
[expect]ShowAggregateErrorto display (#15346)[*]Replaceexitwithexit-x(#15399)[babel-plugin-jest-hoist]Usedenylistinstead of the deprecatedblacklistfor Babel 8 support (#14109)[babel-plugin-jest-hoist]Do not rely on buggy Babel behaviour (#15415)[expect]Check error instance type fortoThrow/toThrowError(#14576)[expect]Improve diff for failingexpect.objectContaining(#15038)[expect]UseArray.isArrayto check if an array is anArray(#15101)[expect]Fix Errorcauseassertion errors (#15339)[jest-changed-files]Print underlying errors when VCS commands fail (#15052)[jest-changed-files]Abortsl rootcall if output resembles a steam locomotive (#15053)[jest-circus][BREAKING] Prevent false test failures caused by promise rejections handled asynchronously (#14315)[jest-circus]Replace recursivemakeTestResultsimplementation with iterative one (#14760)[jest-circus]Omitexpect.hasAssertions()errors if a test already has errors (#14866)[jest-circus, jest-expect, jest-snapshot]Passtest.failingtests 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 respectrunInBandoption (#14578)[jest-config]SupporttestTimeoutin project config (#14697)[jest-config]SupportcoverageReportersin project config (#14697)[jest-config]Allowreportersin project config (#14768)[jest-config]Allow Node16/NodeNext/BundlermoduleResolutionin project's tsconfig (#14739)[@jest/create-cache-key-function]Correct the return type ofcreateCacheKey(#15159)[jest-each]Allow$keypathtemplates withnullorundefinedvalues (#14831)[@jest/expect-utils]Fix comparison ofDataView(#14408)[@jest/expect-utils][BREAKING] exclude non-enumerable in object matching (#14670)[@jest/expect-utils]Fix comparison ofURL(#14672)[@jest/expect-utils]CheckSymbolproperties 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 multiplehasteImplModulePaths (#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_importCoreModelso required core module is consistent if modified while loading (#15077)[jest-schemas, jest-types][BREAKING] Fix type oftestFailureExitCodeconfig option(#15232)[jest-util]Make sureisInteractiveworks in a browser (#14552)[pretty-format][BREAKING] PrintArrayBufferandDataViewcorrectly (#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
testPathPatternconfiguration option totestPathPatterns, which now takes a list of patterns instead of the regex.- [BREAKING]
--testPathPatternis now--testPathPatterns- [BREAKING] Specifying
testPathPatternswhen programmatically callingwatchmust be specified asnew TestPathPatterns(patterns), whereTestPathPatternscan be imported from@jest/pattern[jest-reporters, jest-runner]Unhandled errors without stack get correctly logged to console (#14619)[jest-util]Always loadmjsfiles withimport(#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 whereObjectContainingmatched non-object values. ([#15463])(#15463).
- Adds a
conditional/checkto ensure the argument passed toexpectis an object.- Add unit tests for new
ObjectContainingbehavior.- Remove
invalid/wrongtest case assertions forObjectContaining.[jest-worker]Addresses incorrect state on exit (#15610)Performance
[*][BREAKING] Bundle all of Jest's modules intoindex.js(#12348, #14550 & #14661)[jest-haste-map]Only spawn one process to check forwatchmaninstallation (#14826)[jest-runner]Better cleanupsource-map-supportafter test to resolve (minor) memory leak (#15233)[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(#15325CVE-2024-37890)[*]Increase version ofmicromatchto^4.0.7(#15082)[*][BREAKING] Drop support for Node.js versions 14, 16, 19, 21 and 23 (#14460, #15118, #15623, #15640)[*][BREAKING] Drop support fortypescript@4.3, minimum version is now5.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 toglob@10(#14509)[*]UseTypeErroroverErrorwhere appropriate (#14799)[docs]Fix typos inCHANGELOG.mdandpackages/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/coreto^7.11(#14109)[babel-jest, @jest/transform]Updatebabel-plugin-istanbulto v6 (#15156)[babel-plugin-jest-hoist]Move unnecessarydependenciestodevDependencies(#15010)[expect][BREAKING] Remove.toBeCalled(),.toBeCalledTimes(),.toBeCalledWith(),.lastCalledWith(),.nthCalledWith(),.toReturn(),.toReturnTimes(),.toReturnWith(),.lastReturnedWith(),.nthReturnedWith()and.toThrowError()matcher aliases (#14632)[jest-cli, jest-config, @jest/types][BREAKING] Remove deprecated--initargument (#14490)[jest-config, @jest/core, jest-util]Upgradeci-info(#14655)[jest-mock][BREAKING] RemoveMockFunctionMetadataType,MockFunctionMetadataandSpyInstancetypes (#14621)[@jest/reporters]Upgradeistanbul-lib-source-maps(#14924)[jest-schemas]Upgrade@sinclair/typebox(#14775)[jest-transform]Upgradewrite-file-atomic(#14274)[jest-util]Upgradepicomatchto v4 (#14653 & #14885)[docs] Append to NODE_OPTIONS, not overwrite ([#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)See the CHANGELOG.
Does any of this look wrong? Please let us know.
Commits
See the full diff on Github. The new version differs by more commits than we can show here.
↗️ @jest/core (indirect, 29.7.0 → 30.2.0) · Repo · Changelog
Release Notes
30.2.0
Chore & Maintenance
[*]Update example repo for testing React Native projects (#15832)[*]Updatejest-watch-typeaheadto v3 (#15830)Features
[jest-environment-jsdom-abstract]Add support for JSDOM v27 (#15834)Fixes
30.1.3
Fixes
- Fix
unstable_mockModulewithnode:prefixed core modules.
30.1.2 (from changelog)
Fixes
[jest-snapshot-utils]Correct snapshot header regexp to work with newline across OSes (#15803)
30.1.1
Fixes
[jest-snapshot-utils]Fix deprecated goo.gl snapshot warning not handling Windows end-of-line sequences (#15800)
30.1.0
Features
[jest-leak-detector]Configurable GC aggressiveness regarding to V8 heap snapshot generation (#15793)[jest-runtime]Reduce redundant ReferenceError messages[jest-core]Include test modules that failed to load when --onlyFailures is activeFixes
- `[jest-snapshot-utils] Fix deprecated goo.gl snapshot guide link not getting replaced with fully canonical URL (#15787)
[jest-circus]Fixit.concurrentnot working withdescribe.skip(#15765)[jest-snapshot]Fix mangled inline snapshot updates when used with Prettier 3 and CRLF line endings[jest-runtime]Importing from@jest/globalsin more than one file no longer breaks relative paths (#15772)Chore
[expect]Update docblock fortoContain()to display info on substring check (#15789)
30.0.5 (from changelog)
Features
[jest-config]AllowtestMatchto take a string value[jest-worker]LetworkerIdleMemoryLimitaccept 0 to always restart worker child processesFixes
[expect]Fixbiginterror (#15702)
30.0.4 (from changelog)
Features
[expect]TheInversetype is now exported (#15714)[expect]feat: supportasync functionsintoBe(#15704)Fixes
30.0.3 (from changelog)
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)
30.0.2
What's Changed
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)Full Changelog: https://github.com/jestjs/jest/blob/main/CHANGELOG.md
30.0.1
What's Changed
Features
[jest-resolver]Implement thedefaultAsyncResolver(#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 deprecatejest-replpackage (#15673)[jest-resolver]Replace customisBuiltinModulewith node'sisBuiltin(#15685)New Contributors
Full Changelog: https://github.com/jestjs/jest/blob/main/CHANGELOG.md
30.0.0
Today we are happy to announce the release of Jest 30. This release features a substantial number of changes, fixes, and improvements. While it is one of the largest major releases of Jest ever, we admit that three years for a major release is too long. In the future, we are aiming to make more frequent major releases to keep Jest great for the next decade.
If you want to skip all the news and just get going, run
npm install jest@^30.0.0and follow the migration guide: Upgrading from Jest 29 to 30.Features
[*]RenamedglobalsCleanupModetoglobalsCleanupand--waitNextEventLoopTurnForUnhandledRejectionEventsto--waitForUnhandledRejections[expect]AddArrayOfasymmetric matcher for validating array elements. (#15567)[babel-jest]Add optionexcludeJestPresetto allow opting out ofbabel-preset-jest(#15164)[expect]Revert #15038 to fixexpect(fn).toHaveBeenCalledWith(expect.objectContaining(...))when there are multiple calls (#15508)[jest-circus, jest-cli, jest-config]AddwaitNextEventLoopTurnForUnhandledRejectionEventsflag to minimise performance impact of correct detection of unhandled promise rejections introduced in #14315 (#14681)[jest-circus]Add awaitBeforeRetryoption tojest.retryTimes(#14738)[jest-circus]Add aretryImmediatelyoption tojest.retryTimes(#14696)[jest-circus, jest-jasmine2]AllowsetupFilesAfterEnvto export an async function (#10962)[jest-circus, jest-test-result]AddstartedAttimestamp inTestCaseResultObjectwithinonTestCaseResult(#15145)[jest-cli]ExportbuildArgv(#15310)[jest-config][BREAKING] Addmtsandctsto defaultmoduleFileExtensionsconfig (#14369)[jest-config][BREAKING] UpdatetestMatchandtestRegexdefault option for supportingmjs,cjs,mts, andcts(#14584)[jest-config]Loads config file from provided path inpackage.json(#14044)[jest-config]Allow loadingjest.config.ctsfiles (#14070)[jest-config]ShowrootDirin error message when apresetfails to load (#15194)[jest-config]Support loading TS config files usingesbuild-registervia 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]AddperfStatsto surface test setup overhead (#14622)[@jest/core][BREAKING] Changed--filterto accept an object with shape{ filtered: Array<string> }to match documentation (#13319)[@jest/core]Support--outputFileoption for--listTests(#14980)[@jest/core]Stringify Errors properly with--jsonflag (#15329)[@jest/core, @jest/test-sequencer][BREAKING] ExposesglobalConfig&contextstoTestSequencer(#14535, & #14543)[jest-each]Introduce%$option to add number of the test to its title (#14710)[@jest/environment][BREAKING] Remove deprecatedjest.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 thejsdomenvironment, allowing usage of custom versions of JSDOM (#14717)[jest-environment-node]Update jest environment with dispose symbolsSymbol(#14888 & #14909)[expect, @jest/expect][BREAKING] Add type inference for function parameters inCalledWithassertions (#15129)[@jest/expect-utils]Properly compare all types ofTypedArrays (#15178)[@jest/fake-timers][BREAKING] Upgrade@sinonjs/fake-timersto v13 (#14544 & #15470)[@jest/fake-timers]Exposing new modern timers functionadvanceTimersToFrame()which advances all timers by the needed milliseconds to execute callbacks currently scheduled withrequestAnimationFrame(#14598)[jest-matcher-utils]AddSERIALIZABLE_PROPERTIESto allow custom serialization of objects (#14893)[jest-mock]Add support for the Explicit Resource Management proposal to use theusingkeyword withjest.spyOn(object, methodName)(#14895)[jest-reporters]Add support for DEC mode 2026 (#15008)[jest-resolver]Supportfile://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 functionjest.advanceTimersToFrame()from@jest/fake-timers(#14598)[jest-runtime]Supportimport.meta.filenameandimport.meta.dirname(available from Node 20.11) (#14854)[jest-runtime]Supportimport.meta.resolve(#14930)[jest-runtime][BREAKING] Make it mandatory to passglobalConfigto theRuntimeconstructor (#15044)[jest-runtime]Addunstable_unmockModule(#15080)[jest-runtime]AddonGenerateMocktransformer callback for auto generated callbacks (#15433 & #15482)[jest-runtime][BREAKING] Usevm.compileFunctionovervm.Script(#15461)[@jest/schemas]Upgrade@sinclair/typeboxto v0.34 (#15450)[@jest/types]test.each(): Accept a readonly (as const) table properly (#14565)[@jest/types]Improve argument type inference passed totestanddescribecallback functions fromeachtables (#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 fromjest-snapshotinto its own package (#15095)[pretty-format][BREAKING] Do not render empty string children ('') in React plugin (#14470)Fixes
[expect]ShowAggregateErrorto display (#15346)[*]Replaceexitwithexit-x(#15399)[babel-plugin-jest-hoist]Usedenylistinstead of the deprecatedblacklistfor Babel 8 support (#14109)[babel-plugin-jest-hoist]Do not rely on buggy Babel behaviour (#15415)[expect]Check error instance type fortoThrow/toThrowError(#14576)[expect]Improve diff for failingexpect.objectContaining(#15038)[expect]UseArray.isArrayto check if an array is anArray(#15101)[expect]Fix Errorcauseassertion errors (#15339)[jest-changed-files]Print underlying errors when VCS commands fail (#15052)[jest-changed-files]Abortsl rootcall if output resembles a steam locomotive (#15053)[jest-circus][BREAKING] Prevent false test failures caused by promise rejections handled asynchronously (#14315)[jest-circus]Replace recursivemakeTestResultsimplementation with iterative one (#14760)[jest-circus]Omitexpect.hasAssertions()errors if a test already has errors (#14866)[jest-circus, jest-expect, jest-snapshot]Passtest.failingtests 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 respectrunInBandoption (#14578)[jest-config]SupporttestTimeoutin project config (#14697)[jest-config]SupportcoverageReportersin project config (#14697)[jest-config]Allowreportersin project config (#14768)[jest-config]Allow Node16/NodeNext/BundlermoduleResolutionin project's tsconfig (#14739)[@jest/create-cache-key-function]Correct the return type ofcreateCacheKey(#15159)[jest-each]Allow$keypathtemplates withnullorundefinedvalues (#14831)[@jest/expect-utils]Fix comparison ofDataView(#14408)[@jest/expect-utils][BREAKING] exclude non-enumerable in object matching (#14670)[@jest/expect-utils]Fix comparison ofURL(#14672)[@jest/expect-utils]CheckSymbolproperties 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 multiplehasteImplModulePaths (#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_importCoreModelso required core module is consistent if modified while loading (#15077)[jest-schemas, jest-types][BREAKING] Fix type oftestFailureExitCodeconfig option(#15232)[jest-util]Make sureisInteractiveworks in a browser (#14552)[pretty-format][BREAKING] PrintArrayBufferandDataViewcorrectly (#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
testPathPatternconfiguration option totestPathPatterns, which now takes a list of patterns instead of the regex.- [BREAKING]
--testPathPatternis now--testPathPatterns- [BREAKING] Specifying
testPathPatternswhen programmatically callingwatchmust be specified asnew TestPathPatterns(patterns), whereTestPathPatternscan be imported from@jest/pattern[jest-reporters, jest-runner]Unhandled errors without stack get correctly logged to console (#14619)[jest-util]Always loadmjsfiles withimport(#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 whereObjectContainingmatched non-object values. ([#15463])(#15463).
- Adds a
conditional/checkto ensure the argument passed toexpectis an object.- Add unit tests for new
ObjectContainingbehavior.- Remove
invalid/wrongtest case assertions forObjectContaining.[jest-worker]Addresses incorrect state on exit (#15610)Performance
[*][BREAKING] Bundle all of Jest's modules intoindex.js(#12348, #14550 & #14661)[jest-haste-map]Only spawn one process to check forwatchmaninstallation (#14826)[jest-runner]Better cleanupsource-map-supportafter test to resolve (minor) memory leak (#15233)[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(#15325CVE-2024-37890)[*]Increase version ofmicromatchto^4.0.7(#15082)[*][BREAKING] Drop support for Node.js versions 14, 16, 19, 21 and 23 (#14460, #15118, #15623, #15640)[*][BREAKING] Drop support fortypescript@4.3, minimum version is now5.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 toglob@10(#14509)[*]UseTypeErroroverErrorwhere appropriate (#14799)[docs]Fix typos inCHANGELOG.mdandpackages/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/coreto^7.11(#14109)[babel-jest, @jest/transform]Updatebabel-plugin-istanbulto v6 (#15156)[babel-plugin-jest-hoist]Move unnecessarydependenciestodevDependencies(#15010)[expect][BREAKING] Remove.toBeCalled(),.toBeCalledTimes(),.toBeCalledWith(),.lastCalledWith(),.nthCalledWith(),.toReturn(),.toReturnTimes(),.toReturnWith(),.lastReturnedWith(),.nthReturnedWith()and.toThrowError()matcher aliases (#14632)[jest-cli, jest-config, @jest/types][BREAKING] Remove deprecated--initargument (#14490)[jest-config, @jest/core, jest-util]Upgradeci-info(#14655)[jest-mock][BREAKING] RemoveMockFunctionMetadataType,MockFunctionMetadataandSpyInstancetypes (#14621)[@jest/reporters]Upgradeistanbul-lib-source-maps(#14924)[jest-schemas]Upgrade@sinclair/typebox(#14775)[jest-transform]Upgradewrite-file-atomic(#14274)[jest-util]Upgradepicomatchto v4 (#14653 & #14885)[docs] Append to NODE_OPTIONS, not overwrite ([#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)See the CHANGELOG.
Does any of this look wrong? Please let us know.
Commits
See the full diff on Github. The new version differs by more commits than we can show here.
↗️ @jest/environment (indirect, 29.7.0 → 30.2.0) · Repo · Changelog
Release Notes
30.2.0
Chore & Maintenance
[*]Update example repo for testing React Native projects (#15832)[*]Updatejest-watch-typeaheadto v3 (#15830)Features
[jest-environment-jsdom-abstract]Add support for JSDOM v27 (#15834)Fixes
30.1.1
Fixes
[jest-snapshot-utils]Fix deprecated goo.gl snapshot warning not handling Windows end-of-line sequences (#15800)
30.1.0
Features
[jest-leak-detector]Configurable GC aggressiveness regarding to V8 heap snapshot generation (#15793)[jest-runtime]Reduce redundant ReferenceError messages[jest-core]Include test modules that failed to load when --onlyFailures is activeFixes
- `[jest-snapshot-utils] Fix deprecated goo.gl snapshot guide link not getting replaced with fully canonical URL (#15787)
[jest-circus]Fixit.concurrentnot working withdescribe.skip(#15765)[jest-snapshot]Fix mangled inline snapshot updates when used with Prettier 3 and CRLF line endings[jest-runtime]Importing from@jest/globalsin more than one file no longer breaks relative paths (#15772)Chore
[expect]Update docblock fortoContain()to display info on substring check (#15789)
30.0.5 (from changelog)
Features
[jest-config]AllowtestMatchto take a string value[jest-worker]LetworkerIdleMemoryLimitaccept 0 to always restart worker child processesFixes
[expect]Fixbiginterror (#15702)
30.0.4 (from changelog)
Features
[expect]TheInversetype is now exported (#15714)[expect]feat: supportasync functionsintoBe(#15704)Fixes
30.0.2
What's Changed
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)Full Changelog: https://github.com/jestjs/jest/blob/main/CHANGELOG.md
30.0.1
What's Changed
Features
[jest-resolver]Implement thedefaultAsyncResolver(#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 deprecatejest-replpackage (#15673)[jest-resolver]Replace customisBuiltinModulewith node'sisBuiltin(#15685)New Contributors
Full Changelog: https://github.com/jestjs/jest/blob/main/CHANGELOG.md
30.0.0
Today we are happy to announce the release of Jest 30. This release features a substantial number of changes, fixes, and improvements. While it is one of the largest major releases of Jest ever, we admit that three years for a major release is too long. In the future, we are aiming to make more frequent major releases to keep Jest great for the next decade.
If you want to skip all the news and just get going, run
npm install jest@^30.0.0and follow the migration guide: Upgrading from Jest 29 to 30.Features
[*]RenamedglobalsCleanupModetoglobalsCleanupand--waitNextEventLoopTurnForUnhandledRejectionEventsto--waitForUnhandledRejections[expect]AddArrayOfasymmetric matcher for validating array elements. (#15567)[babel-jest]Add optionexcludeJestPresetto allow opting out ofbabel-preset-jest(#15164)[expect]Revert #15038 to fixexpect(fn).toHaveBeenCalledWith(expect.objectContaining(...))when there are multiple calls (#15508)[jest-circus, jest-cli, jest-config]AddwaitNextEventLoopTurnForUnhandledRejectionEventsflag to minimise performance impact of correct detection of unhandled promise rejections introduced in #14315 (#14681)[jest-circus]Add awaitBeforeRetryoption tojest.retryTimes(#14738)[jest-circus]Add aretryImmediatelyoption tojest.retryTimes(#14696)[jest-circus, jest-jasmine2]AllowsetupFilesAfterEnvto export an async function (#10962)[jest-circus, jest-test-result]AddstartedAttimestamp inTestCaseResultObjectwithinonTestCaseResult(#15145)[jest-cli]ExportbuildArgv(#15310)[jest-config][BREAKING] Addmtsandctsto defaultmoduleFileExtensionsconfig (#14369)[jest-config][BREAKING] UpdatetestMatchandtestRegexdefault option for supportingmjs,cjs,mts, andcts(#14584)[jest-config]Loads config file from provided path inpackage.json(#14044)[jest-config]Allow loadingjest.config.ctsfiles (#14070)[jest-config]ShowrootDirin error message when apresetfails to load (#15194)[jest-config]Support loading TS config files usingesbuild-registervia 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]AddperfStatsto surface test setup overhead (#14622)[@jest/core][BREAKING] Changed--filterto accept an object with shape{ filtered: Array<string> }to match documentation (#13319)[@jest/core]Support--outputFileoption for--listTests(#14980)[@jest/core]Stringify Errors properly with--jsonflag (#15329)[@jest/core, @jest/test-sequencer][BREAKING] ExposesglobalConfig&contextstoTestSequencer(#14535, & #14543)[jest-each]Introduce%$option to add number of the test to its title (#14710)[@jest/environment][BREAKING] Remove deprecatedjest.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 thejsdomenvironment, allowing usage of custom versions of JSDOM (#14717)[jest-environment-node]Update jest environment with dispose symbolsSymbol(#14888 & #14909)[expect, @jest/expect][BREAKING] Add type inference for function parameters inCalledWithassertions (#15129)[@jest/expect-utils]Properly compare all types ofTypedArrays (#15178)[@jest/fake-timers][BREAKING] Upgrade@sinonjs/fake-timersto v13 (#14544 & #15470)[@jest/fake-timers]Exposing new modern timers functionadvanceTimersToFrame()which advances all timers by the needed milliseconds to execute callbacks currently scheduled withrequestAnimationFrame(#14598)[jest-matcher-utils]AddSERIALIZABLE_PROPERTIESto allow custom serialization of objects (#14893)[jest-mock]Add support for the Explicit Resource Management proposal to use theusingkeyword withjest.spyOn(object, methodName)(#14895)[jest-reporters]Add support for DEC mode 2026 (#15008)[jest-resolver]Supportfile://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 functionjest.advanceTimersToFrame()from@jest/fake-timers(#14598)[jest-runtime]Supportimport.meta.filenameandimport.meta.dirname(available from Node 20.11) (#14854)[jest-runtime]Supportimport.meta.resolve(#14930)[jest-runtime][BREAKING] Make it mandatory to passglobalConfigto theRuntimeconstructor (#15044)[jest-runtime]Addunstable_unmockModule(#15080)[jest-runtime]AddonGenerateMocktransformer callback for auto generated callbacks (#15433 & #15482)[jest-runtime][BREAKING] Usevm.compileFunctionovervm.Script(#15461)[@jest/schemas]Upgrade@sinclair/typeboxto v0.34 (#15450)[@jest/types]test.each(): Accept a readonly (as const) table properly (#14565)[@jest/types]Improve argument type inference passed totestanddescribecallback functions fromeachtables (#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 fromjest-snapshotinto its own package (#15095)[pretty-format][BREAKING] Do not render empty string children ('') in React plugin (#14470)Fixes
[expect]ShowAggregateErrorto display (#15346)[*]Replaceexitwithexit-x(#15399)[babel-plugin-jest-hoist]Usedenylistinstead of the deprecatedblacklistfor Babel 8 support (#14109)[babel-plugin-jest-hoist]Do not rely on buggy Babel behaviour (#15415)[expect]Check error instance type fortoThrow/toThrowError(#14576)[expect]Improve diff for failingexpect.objectContaining(#15038)[expect]UseArray.isArrayto check if an array is anArray(#15101)[expect]Fix Errorcauseassertion errors (#15339)[jest-changed-files]Print underlying errors when VCS commands fail (#15052)[jest-changed-files]Abortsl rootcall if output resembles a steam locomotive (#15053)[jest-circus][BREAKING] Prevent false test failures caused by promise rejections handled asynchronously (#14315)[jest-circus]Replace recursivemakeTestResultsimplementation with iterative one (#14760)[jest-circus]Omitexpect.hasAssertions()errors if a test already has errors (#14866)[jest-circus, jest-expect, jest-snapshot]Passtest.failingtests 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 respectrunInBandoption (#14578)[jest-config]SupporttestTimeoutin project config (#14697)[jest-config]SupportcoverageReportersin project config (#14697)[jest-config]Allowreportersin project config (#14768)[jest-config]Allow Node16/NodeNext/BundlermoduleResolutionin project's tsconfig (#14739)[@jest/create-cache-key-function]Correct the return type ofcreateCacheKey(#15159)[jest-each]Allow$keypathtemplates withnullorundefinedvalues (#14831)[@jest/expect-utils]Fix comparison ofDataView(#14408)[@jest/expect-utils][BREAKING] exclude non-enumerable in object matching (#14670)[@jest/expect-utils]Fix comparison ofURL(#14672)[@jest/expect-utils]CheckSymbolproperties 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 multiplehasteImplModulePaths (#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_importCoreModelso required core module is consistent if modified while loading (#15077)[jest-schemas, jest-types][BREAKING] Fix type oftestFailureExitCodeconfig option(#15232)[jest-util]Make sureisInteractiveworks in a browser (#14552)[pretty-format][BREAKING] PrintArrayBufferandDataViewcorrectly (#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
testPathPatternconfiguration option totestPathPatterns, which now takes a list of patterns instead of the regex.- [BREAKING]
--testPathPatternis now--testPathPatterns- [BREAKING] Specifying
testPathPatternswhen programmatically callingwatchmust be specified asnew TestPathPatterns(patterns), whereTestPathPatternscan be imported from@jest/pattern[jest-reporters, jest-runner]Unhandled errors without stack get correctly logged to console (#14619)[jest-util]Always loadmjsfiles withimport(#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 whereObjectContainingmatched non-object values. ([#15463])(#15463).
- Adds a
conditional/checkto ensure the argument passed toexpectis an object.- Add unit tests for new
ObjectContainingbehavior.- Remove
invalid/wrongtest case assertions forObjectContaining.[jest-worker]Addresses incorrect state on exit (#15610)Performance
[*][BREAKING] Bundle all of Jest's modules intoindex.js(#12348, #14550 & #14661)[jest-haste-map]Only spawn one process to check forwatchmaninstallation (#14826)[jest-runner]Better cleanupsource-map-supportafter test to resolve (minor) memory leak (#15233)[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(#15325CVE-2024-37890)[*]Increase version ofmicromatchto^4.0.7(#15082)[*][BREAKING] Drop support for Node.js versions 14, 16, 19, 21 and 23 (#14460, #15118, #15623, #15640)[*][BREAKING] Drop support fortypescript@4.3, minimum version is now5.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 toglob@10(#14509)[*]UseTypeErroroverErrorwhere appropriate (#14799)[docs]Fix typos inCHANGELOG.mdandpackages/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/coreto^7.11(#14109)[babel-jest, @jest/transform]Updatebabel-plugin-istanbulto v6 (#15156)[babel-plugin-jest-hoist]Move unnecessarydependenciestodevDependencies(#15010)[expect][BREAKING] Remove.toBeCalled(),.toBeCalledTimes(),.toBeCalledWith(),.lastCalledWith(),.nthCalledWith(),.toReturn(),.toReturnTimes(),.toReturnWith(),.lastReturnedWith(),.nthReturnedWith()and.toThrowError()matcher aliases (#14632)[jest-cli, jest-config, @jest/types][BREAKING] Remove deprecated--initargument (#14490)[jest-config, @jest/core, jest-util]Upgradeci-info(#14655)[jest-mock][BREAKING] RemoveMockFunctionMetadataType,MockFunctionMetadataandSpyInstancetypes (#14621)[@jest/reporters]Upgradeistanbul-lib-source-maps(#14924)[jest-schemas]Upgrade@sinclair/typebox(#14775)[jest-transform]Upgradewrite-file-atomic(#14274)[jest-util]Upgradepicomatchto v4 (#14653 & #14885)[docs] Append to NODE_OPTIONS, not overwrite ([#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)See the CHANGELOG.
Does any of this look wrong? Please let us know.
Commits
See the full diff on Github. The new version differs by more commits than we can show here.
↗️ @jest/fake-timers (indirect, 29.7.0 → 30.2.0) · Repo · Changelog
Release Notes
30.2.0
Chore & Maintenance
[*]Update example repo for testing React Native projects (#15832)[*]Updatejest-watch-typeaheadto v3 (#15830)Features
[jest-environment-jsdom-abstract]Add support for JSDOM v27 (#15834)Fixes
30.1.1
Fixes
[jest-snapshot-utils]Fix deprecated goo.gl snapshot warning not handling Windows end-of-line sequences (#15800)
30.1.0
Features
[jest-leak-detector]Configurable GC aggressiveness regarding to V8 heap snapshot generation (#15793)[jest-runtime]Reduce redundant ReferenceError messages[jest-core]Include test modules that failed to load when --onlyFailures is activeFixes
- `[jest-snapshot-utils] Fix deprecated goo.gl snapshot guide link not getting replaced with fully canonical URL (#15787)
[jest-circus]Fixit.concurrentnot working withdescribe.skip(#15765)[jest-snapshot]Fix mangled inline snapshot updates when used with Prettier 3 and CRLF line endings[jest-runtime]Importing from@jest/globalsin more than one file no longer breaks relative paths (#15772)Chore
[expect]Update docblock fortoContain()to display info on substring check (#15789)
30.0.5 (from changelog)
Features
[jest-config]AllowtestMatchto take a string value[jest-worker]LetworkerIdleMemoryLimitaccept 0 to always restart worker child processesFixes
[expect]Fixbiginterror (#15702)
30.0.4 (from changelog)
Features
[expect]TheInversetype is now exported (#15714)[expect]feat: supportasync functionsintoBe(#15704)Fixes
30.0.2
What's Changed
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)Full Changelog: https://github.com/jestjs/jest/blob/main/CHANGELOG.md
30.0.1
What's Changed
Features
[jest-resolver]Implement thedefaultAsyncResolver(#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 deprecatejest-replpackage (#15673)[jest-resolver]Replace customisBuiltinModulewith node'sisBuiltin(#15685)New Contributors
Full Changelog: https://github.com/jestjs/jest/blob/main/CHANGELOG.md
30.0.0
Today we are happy to announce the release of Jest 30. This release features a substantial number of changes, fixes, and improvements. While it is one of the largest major releases of Jest ever, we admit that three years for a major release is too long. In the future, we are aiming to make more frequent major releases to keep Jest great for the next decade.
If you want to skip all the news and just get going, run
npm install jest@^30.0.0and follow the migration guide: Upgrading from Jest 29 to 30.Features
[*]RenamedglobalsCleanupModetoglobalsCleanupand--waitNextEventLoopTurnForUnhandledRejectionEventsto--waitForUnhandledRejections[expect]AddArrayOfasymmetric matcher for validating array elements. (#15567)[babel-jest]Add optionexcludeJestPresetto allow opting out ofbabel-preset-jest(#15164)[expect]Revert #15038 to fixexpect(fn).toHaveBeenCalledWith(expect.objectContaining(...))when there are multiple calls (#15508)[jest-circus, jest-cli, jest-config]AddwaitNextEventLoopTurnForUnhandledRejectionEventsflag to minimise performance impact of correct detection of unhandled promise rejections introduced in #14315 (#14681)[jest-circus]Add awaitBeforeRetryoption tojest.retryTimes(#14738)[jest-circus]Add aretryImmediatelyoption tojest.retryTimes(#14696)[jest-circus, jest-jasmine2]AllowsetupFilesAfterEnvto export an async function (#10962)[jest-circus, jest-test-result]AddstartedAttimestamp inTestCaseResultObjectwithinonTestCaseResult(#15145)[jest-cli]ExportbuildArgv(#15310)[jest-config][BREAKING] Addmtsandctsto defaultmoduleFileExtensionsconfig (#14369)[jest-config][BREAKING] UpdatetestMatchandtestRegexdefault option for supportingmjs,cjs,mts, andcts(#14584)[jest-config]Loads config file from provided path inpackage.json(#14044)[jest-config]Allow loadingjest.config.ctsfiles (#14070)[jest-config]ShowrootDirin error message when apresetfails to load (#15194)[jest-config]Support loading TS config files usingesbuild-registervia 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]AddperfStatsto surface test setup overhead (#14622)[@jest/core][BREAKING] Changed--filterto accept an object with shape{ filtered: Array<string> }to match documentation (#13319)[@jest/core]Support--outputFileoption for--listTests(#14980)[@jest/core]Stringify Errors properly with--jsonflag (#15329)[@jest/core, @jest/test-sequencer][BREAKING] ExposesglobalConfig&contextstoTestSequencer(#14535, & #14543)[jest-each]Introduce%$option to add number of the test to its title (#14710)[@jest/environment][BREAKING] Remove deprecatedjest.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 thejsdomenvironment, allowing usage of custom versions of JSDOM (#14717)[jest-environment-node]Update jest environment with dispose symbolsSymbol(#14888 & #14909)[expect, @jest/expect][BREAKING] Add type inference for function parameters inCalledWithassertions (#15129)[@jest/expect-utils]Properly compare all types ofTypedArrays (#15178)[@jest/fake-timers][BREAKING] Upgrade@sinonjs/fake-timersto v13 (#14544 & #15470)[@jest/fake-timers]Exposing new modern timers functionadvanceTimersToFrame()which advances all timers by the needed milliseconds to execute callbacks currently scheduled withrequestAnimationFrame(#14598)[jest-matcher-utils]AddSERIALIZABLE_PROPERTIESto allow custom serialization of objects (#14893)[jest-mock]Add support for the Explicit Resource Management proposal to use theusingkeyword withjest.spyOn(object, methodName)(#14895)[jest-reporters]Add support for DEC mode 2026 (#15008)[jest-resolver]Supportfile://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 functionjest.advanceTimersToFrame()from@jest/fake-timers(#14598)[jest-runtime]Supportimport.meta.filenameandimport.meta.dirname(available from Node 20.11) (#14854)[jest-runtime]Supportimport.meta.resolve(#14930)[jest-runtime][BREAKING] Make it mandatory to passglobalConfigto theRuntimeconstructor (#15044)[jest-runtime]Addunstable_unmockModule(#15080)[jest-runtime]AddonGenerateMocktransformer callback for auto generated callbacks (#15433 & #15482)[jest-runtime][BREAKING] Usevm.compileFunctionovervm.Script(#15461)[@jest/schemas]Upgrade@sinclair/typeboxto v0.34 (#15450)[@jest/types]test.each(): Accept a readonly (as const) table properly (#14565)[@jest/types]Improve argument type inference passed totestanddescribecallback functions fromeachtables (#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 fromjest-snapshotinto its own package (#15095)[pretty-format][BREAKING] Do not render empty string children ('') in React plugin (#14470)Fixes
[expect]ShowAggregateErrorto display (#15346)[*]Replaceexitwithexit-x(#15399)[babel-plugin-jest-hoist]Usedenylistinstead of the deprecatedblacklistfor Babel 8 support (#14109)[babel-plugin-jest-hoist]Do not rely on buggy Babel behaviour (#15415)[expect]Check error instance type fortoThrow/toThrowError(#14576)[expect]Improve diff for failingexpect.objectContaining(#15038)[expect]UseArray.isArrayto check if an array is anArray(#15101)[expect]Fix Errorcauseassertion errors (#15339)[jest-changed-files]Print underlying errors when VCS commands fail (#15052)[jest-changed-files]Abortsl rootcall if output resembles a steam locomotive (#15053)[jest-circus][BREAKING] Prevent false test failures caused by promise rejections handled asynchronously (#14315)[jest-circus]Replace recursivemakeTestResultsimplementation with iterative one (#14760)[jest-circus]Omitexpect.hasAssertions()errors if a test already has errors (#14866)[jest-circus, jest-expect, jest-snapshot]Passtest.failingtests 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 respectrunInBandoption (#14578)[jest-config]SupporttestTimeoutin project config (#14697)[jest-config]SupportcoverageReportersin project config (#14697)[jest-config]Allowreportersin project config (#14768)[jest-config]Allow Node16/NodeNext/BundlermoduleResolutionin project's tsconfig (#14739)[@jest/create-cache-key-function]Correct the return type ofcreateCacheKey(#15159)[jest-each]Allow$keypathtemplates withnullorundefinedvalues (#14831)[@jest/expect-utils]Fix comparison ofDataView(#14408)[@jest/expect-utils][BREAKING] exclude non-enumerable in object matching (#14670)[@jest/expect-utils]Fix comparison ofURL(#14672)[@jest/expect-utils]CheckSymbolproperties 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 multiplehasteImplModulePaths (#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_importCoreModelso required core module is consistent if modified while loading (#15077)[jest-schemas, jest-types][BREAKING] Fix type oftestFailureExitCodeconfig option(#15232)[jest-util]Make sureisInteractiveworks in a browser (#14552)[pretty-format][BREAKING] PrintArrayBufferandDataViewcorrectly (#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
testPathPatternconfiguration option totestPathPatterns, which now takes a list of patterns instead of the regex.- [BREAKING]
--testPathPatternis now--testPathPatterns- [BREAKING] Specifying
testPathPatternswhen programmatically callingwatchmust be specified asnew TestPathPatterns(patterns), whereTestPathPatternscan be imported from@jest/pattern[jest-reporters, jest-runner]Unhandled errors without stack get correctly logged to console (#14619)[jest-util]Always loadmjsfiles withimport(#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 whereObjectContainingmatched non-object values. ([#15463])(#15463).
- Adds a
conditional/checkto ensure the argument passed toexpectis an object.- Add unit tests for new
ObjectContainingbehavior.- Remove
invalid/wrongtest case assertions forObjectContaining.[jest-worker]Addresses incorrect state on exit (#15610)Performance
[*][BREAKING] Bundle all of Jest's modules intoindex.js(#12348, #14550 & #14661)[jest-haste-map]Only spawn one process to check forwatchmaninstallation (#14826)[jest-runner]Better cleanupsource-map-supportafter test to resolve (minor) memory leak (#15233)[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(#15325CVE-2024-37890)[*]Increase version ofmicromatchto^4.0.7(#15082)[*][BREAKING] Drop support for Node.js versions 14, 16, 19, 21 and 23 (#14460, #15118, #15623, #15640)[*][BREAKING] Drop support fortypescript@4.3, minimum version is now5.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 toglob@10(#14509)[*]UseTypeErroroverErrorwhere appropriate (#14799)[docs]Fix typos inCHANGELOG.mdandpackages/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/coreto^7.11(#14109)[babel-jest, @jest/transform]Updatebabel-plugin-istanbulto v6 (#15156)[babel-plugin-jest-hoist]Move unnecessarydependenciestodevDependencies(#15010)[expect][BREAKING] Remove.toBeCalled(),.toBeCalledTimes(),.toBeCalledWith(),.lastCalledWith(),.nthCalledWith(),.toReturn(),.toReturnTimes(),.toReturnWith(),.lastReturnedWith(),.nthReturnedWith()and.toThrowError()matcher aliases (#14632)[jest-cli, jest-config, @jest/types][BREAKING] Remove deprecated--initargument (#14490)[jest-config, @jest/core, jest-util]Upgradeci-info(#14655)[jest-mock][BREAKING] RemoveMockFunctionMetadataType,MockFunctionMetadataandSpyInstancetypes (#14621)[@jest/reporters]Upgradeistanbul-lib-source-maps(#14924)[jest-schemas]Upgrade@sinclair/typebox(#14775)[jest-transform]Upgradewrite-file-atomic(#14274)[jest-util]Upgradepicomatchto v4 (#14653 & #14885)[docs] Append to NODE_OPTIONS, not overwrite ([#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)See the CHANGELOG.
Does any of this look wrong? Please let us know.
Commits
See the full diff on Github. The new version differs by more commits than we can show here.
↗️ @jest/reporters (indirect, 29.7.0 → 30.2.0) · Repo · Changelog
Release Notes
30.2.0
Chore & Maintenance
[*]Update example repo for testing React Native projects (#15832)[*]Updatejest-watch-typeaheadto v3 (#15830)Features
[jest-environment-jsdom-abstract]Add support for JSDOM v27 (#15834)Fixes
30.1.3
Fixes
- Fix
unstable_mockModulewithnode:prefixed core modules.
30.1.2 (from changelog)
Fixes
[jest-snapshot-utils]Correct snapshot header regexp to work with newline across OSes (#15803)
30.1.1
Fixes
[jest-snapshot-utils]Fix deprecated goo.gl snapshot warning not handling Windows end-of-line sequences (#15800)
30.1.0
Features
[jest-leak-detector]Configurable GC aggressiveness regarding to V8 heap snapshot generation (#15793)[jest-runtime]Reduce redundant ReferenceError messages[jest-core]Include test modules that failed to load when --onlyFailures is activeFixes
- `[jest-snapshot-utils] Fix deprecated goo.gl snapshot guide link not getting replaced with fully canonical URL (#15787)
[jest-circus]Fixit.concurrentnot working withdescribe.skip(#15765)[jest-snapshot]Fix mangled inline snapshot updates when used with Prettier 3 and CRLF line endings[jest-runtime]Importing from@jest/globalsin more than one file no longer breaks relative paths (#15772)Chore
[expect]Update docblock fortoContain()to display info on substring check (#15789)
30.0.5 (from changelog)
Features
[jest-config]AllowtestMatchto take a string value[jest-worker]LetworkerIdleMemoryLimitaccept 0 to always restart worker child processesFixes
[expect]Fixbiginterror (#15702)
30.0.4 (from changelog)
Features
[expect]TheInversetype is now exported (#15714)[expect]feat: supportasync functionsintoBe(#15704)Fixes
30.0.2
What's Changed
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)Full Changelog: https://github.com/jestjs/jest/blob/main/CHANGELOG.md
30.0.1
What's Changed
Features
[jest-resolver]Implement thedefaultAsyncResolver(#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 deprecatejest-replpackage (#15673)[jest-resolver]Replace customisBuiltinModulewith node'sisBuiltin(#15685)New Contributors
Full Changelog: https://github.com/jestjs/jest/blob/main/CHANGELOG.md
30.0.0
Today we are happy to announce the release of Jest 30. This release features a substantial number of changes, fixes, and improvements. While it is one of the largest major releases of Jest ever, we admit that three years for a major release is too long. In the future, we are aiming to make more frequent major releases to keep Jest great for the next decade.
If you want to skip all the news and just get going, run
npm install jest@^30.0.0and follow the migration guide: Upgrading from Jest 29 to 30.Features
[*]RenamedglobalsCleanupModetoglobalsCleanupand--waitNextEventLoopTurnForUnhandledRejectionEventsto--waitForUnhandledRejections[expect]AddArrayOfasymmetric matcher for validating array elements. (#15567)[babel-jest]Add optionexcludeJestPresetto allow opting out ofbabel-preset-jest(#15164)[expect]Revert #15038 to fixexpect(fn).toHaveBeenCalledWith(expect.objectContaining(...))when there are multiple calls (#15508)[jest-circus, jest-cli, jest-config]AddwaitNextEventLoopTurnForUnhandledRejectionEventsflag to minimise performance impact of correct detection of unhandled promise rejections introduced in #14315 (#14681)[jest-circus]Add awaitBeforeRetryoption tojest.retryTimes(#14738)[jest-circus]Add aretryImmediatelyoption tojest.retryTimes(#14696)[jest-circus, jest-jasmine2]AllowsetupFilesAfterEnvto export an async function (#10962)[jest-circus, jest-test-result]AddstartedAttimestamp inTestCaseResultObjectwithinonTestCaseResult(#15145)[jest-cli]ExportbuildArgv(#15310)[jest-config][BREAKING] Addmtsandctsto defaultmoduleFileExtensionsconfig (#14369)[jest-config][BREAKING] UpdatetestMatchandtestRegexdefault option for supportingmjs,cjs,mts, andcts(#14584)[jest-config]Loads config file from provided path inpackage.json(#14044)[jest-config]Allow loadingjest.config.ctsfiles (#14070)[jest-config]ShowrootDirin error message when apresetfails to load (#15194)[jest-config]Support loading TS config files usingesbuild-registervia 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]AddperfStatsto surface test setup overhead (#14622)[@jest/core][BREAKING] Changed--filterto accept an object with shape{ filtered: Array<string> }to match documentation (#13319)[@jest/core]Support--outputFileoption for--listTests(#14980)[@jest/core]Stringify Errors properly with--jsonflag (#15329)[@jest/core, @jest/test-sequencer][BREAKING] ExposesglobalConfig&contextstoTestSequencer(#14535, & #14543)[jest-each]Introduce%$option to add number of the test to its title (#14710)[@jest/environment][BREAKING] Remove deprecatedjest.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 thejsdomenvironment, allowing usage of custom versions of JSDOM (#14717)[jest-environment-node]Update jest environment with dispose symbolsSymbol(#14888 & #14909)[expect, @jest/expect][BREAKING] Add type inference for function parameters inCalledWithassertions (#15129)[@jest/expect-utils]Properly compare all types ofTypedArrays (#15178)[@jest/fake-timers][BREAKING] Upgrade@sinonjs/fake-timersto v13 (#14544 & #15470)[@jest/fake-timers]Exposing new modern timers functionadvanceTimersToFrame()which advances all timers by the needed milliseconds to execute callbacks currently scheduled withrequestAnimationFrame(#14598)[jest-matcher-utils]AddSERIALIZABLE_PROPERTIESto allow custom serialization of objects (#14893)[jest-mock]Add support for the Explicit Resource Management proposal to use theusingkeyword withjest.spyOn(object, methodName)(#14895)[jest-reporters]Add support for DEC mode 2026 (#15008)[jest-resolver]Supportfile://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 functionjest.advanceTimersToFrame()from@jest/fake-timers(#14598)[jest-runtime]Supportimport.meta.filenameandimport.meta.dirname(available from Node 20.11) (#14854)[jest-runtime]Supportimport.meta.resolve(#14930)[jest-runtime][BREAKING] Make it mandatory to passglobalConfigto theRuntimeconstructor (#15044)[jest-runtime]Addunstable_unmockModule(#15080)[jest-runtime]AddonGenerateMocktransformer callback for auto generated callbacks (#15433 & #15482)[jest-runtime][BREAKING] Usevm.compileFunctionovervm.Script(#15461)[@jest/schemas]Upgrade@sinclair/typeboxto v0.34 (#15450)[@jest/types]test.each(): Accept a readonly (as const) table properly (#14565)[@jest/types]Improve argument type inference passed totestanddescribecallback functions fromeachtables (#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 fromjest-snapshotinto its own package (#15095)[pretty-format][BREAKING] Do not render empty string children ('') in React plugin (#14470)Fixes
[expect]ShowAggregateErrorto display (#15346)[*]Replaceexitwithexit-x(#15399)[babel-plugin-jest-hoist]Usedenylistinstead of the deprecatedblacklistfor Babel 8 support (#14109)[babel-plugin-jest-hoist]Do not rely on buggy Babel behaviour (#15415)[expect]Check error instance type fortoThrow/toThrowError(#14576)[expect]Improve diff for failingexpect.objectContaining(#15038)[expect]UseArray.isArrayto check if an array is anArray(#15101)[expect]Fix Errorcauseassertion errors (#15339)[jest-changed-files]Print underlying errors when VCS commands fail (#15052)[jest-changed-files]Abortsl rootcall if output resembles a steam locomotive (#15053)[jest-circus][BREAKING] Prevent false test failures caused by promise rejections handled asynchronously (#14315)[jest-circus]Replace recursivemakeTestResultsimplementation with iterative one (#14760)[jest-circus]Omitexpect.hasAssertions()errors if a test already has errors (#14866)[jest-circus, jest-expect, jest-snapshot]Passtest.failingtests 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 respectrunInBandoption (#14578)[jest-config]SupporttestTimeoutin project config (#14697)[jest-config]SupportcoverageReportersin project config (#14697)[jest-config]Allowreportersin project config (#14768)[jest-config]Allow Node16/NodeNext/BundlermoduleResolutionin project's tsconfig (#14739)[@jest/create-cache-key-function]Correct the return type ofcreateCacheKey(#15159)[jest-each]Allow$keypathtemplates withnullorundefinedvalues (#14831)[@jest/expect-utils]Fix comparison ofDataView(#14408)[@jest/expect-utils][BREAKING] exclude non-enumerable in object matching (#14670)[@jest/expect-utils]Fix comparison ofURL(#14672)[@jest/expect-utils]CheckSymbolproperties 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 multiplehasteImplModulePaths (#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_importCoreModelso required core module is consistent if modified while loading (#15077)[jest-schemas, jest-types][BREAKING] Fix type oftestFailureExitCodeconfig option(#15232)[jest-util]Make sureisInteractiveworks in a browser (#14552)[pretty-format][BREAKING] PrintArrayBufferandDataViewcorrectly (#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
testPathPatternconfiguration option totestPathPatterns, which now takes a list of patterns instead of the regex.- [BREAKING]
--testPathPatternis now--testPathPatterns- [BREAKING] Specifying
testPathPatternswhen programmatically callingwatchmust be specified asnew TestPathPatterns(patterns), whereTestPathPatternscan be imported from@jest/pattern[jest-reporters, jest-runner]Unhandled errors without stack get correctly logged to console (#14619)[jest-util]Always loadmjsfiles withimport(#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 whereObjectContainingmatched non-object values. ([#15463])(#15463).
- Adds a
conditional/checkto ensure the argument passed toexpectis an object.- Add unit tests for new
ObjectContainingbehavior.- Remove
invalid/wrongtest case assertions forObjectContaining.[jest-worker]Addresses incorrect state on exit (#15610)Performance
[*][BREAKING] Bundle all of Jest's modules intoindex.js(#12348, #14550 & #14661)[jest-haste-map]Only spawn one process to check forwatchmaninstallation (#14826)[jest-runner]Better cleanupsource-map-supportafter test to resolve (minor) memory leak (#15233)[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(#15325CVE-2024-37890)[*]Increase version ofmicromatchto^4.0.7(#15082)[*][BREAKING] Drop support for Node.js versions 14, 16, 19, 21 and 23 (#14460, #15118, #15623, #15640)[*][BREAKING] Drop support fortypescript@4.3, minimum version is now5.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 toglob@10(#14509)[*]UseTypeErroroverErrorwhere appropriate (#14799)[docs]Fix typos inCHANGELOG.mdandpackages/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/coreto^7.11(#14109)[babel-jest, @jest/transform]Updatebabel-plugin-istanbulto v6 (#15156)[babel-plugin-jest-hoist]Move unnecessarydependenciestodevDependencies(#15010)[expect][BREAKING] Remove.toBeCalled(),.toBeCalledTimes(),.toBeCalledWith(),.lastCalledWith(),.nthCalledWith(),.toReturn(),.toReturnTimes(),.toReturnWith(),.lastReturnedWith(),.nthReturnedWith()and.toThrowError()matcher aliases (#14632)[jest-cli, jest-config, @jest/types][BREAKING] Remove deprecated--initargument (#14490)[jest-config, @jest/core, jest-util]Upgradeci-info(#14655)[jest-mock][BREAKING] RemoveMockFunctionMetadataType,MockFunctionMetadataandSpyInstancetypes (#14621)[@jest/reporters]Upgradeistanbul-lib-source-maps(#14924)[jest-schemas]Upgrade@sinclair/typebox(#14775)[jest-transform]Upgradewrite-file-atomic(#14274)[jest-util]Upgradepicomatchto v4 (#14653 & #14885)[docs] Append to NODE_OPTIONS, not overwrite ([#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)See the CHANGELOG.
Does any of this look wrong? Please let us know.
Commits
See the full diff on Github. The new version differs by more commits than we can show here.
↗️ @jest/schemas (indirect, 29.6.3 → 30.0.5) · Repo · Changelog
Release Notes
30.0.5 (from changelog)
Features
[jest-config]AllowtestMatchto take a string value[jest-worker]LetworkerIdleMemoryLimitaccept 0 to always restart worker child processesFixes
[expect]Fixbiginterror (#15702)
30.0.1
What's Changed
Features
[jest-resolver]Implement thedefaultAsyncResolver(#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 deprecatejest-replpackage (#15673)[jest-resolver]Replace customisBuiltinModulewith node'sisBuiltin(#15685)New Contributors
Full Changelog: https://github.com/jestjs/jest/blob/main/CHANGELOG.md
30.0.0
Today we are happy to announce the release of Jest 30. This release features a substantial number of changes, fixes, and improvements. While it is one of the largest major releases of Jest ever, we admit that three years for a major release is too long. In the future, we are aiming to make more frequent major releases to keep Jest great for the next decade.
If you want to skip all the news and just get going, run
npm install jest@^30.0.0and follow the migration guide: Upgrading from Jest 29 to 30.Features
[*]RenamedglobalsCleanupModetoglobalsCleanupand--waitNextEventLoopTurnForUnhandledRejectionEventsto--waitForUnhandledRejections[expect]AddArrayOfasymmetric matcher for validating array elements. (#15567)[babel-jest]Add optionexcludeJestPresetto allow opting out ofbabel-preset-jest(#15164)[expect]Revert #15038 to fixexpect(fn).toHaveBeenCalledWith(expect.objectContaining(...))when there are multiple calls (#15508)[jest-circus, jest-cli, jest-config]AddwaitNextEventLoopTurnForUnhandledRejectionEventsflag to minimise performance impact of correct detection of unhandled promise rejections introduced in #14315 (#14681)[jest-circus]Add awaitBeforeRetryoption tojest.retryTimes(#14738)[jest-circus]Add aretryImmediatelyoption tojest.retryTimes(#14696)[jest-circus, jest-jasmine2]AllowsetupFilesAfterEnvto export an async function (#10962)[jest-circus, jest-test-result]AddstartedAttimestamp inTestCaseResultObjectwithinonTestCaseResult(#15145)[jest-cli]ExportbuildArgv(#15310)[jest-config][BREAKING] Addmtsandctsto defaultmoduleFileExtensionsconfig (#14369)[jest-config][BREAKING] UpdatetestMatchandtestRegexdefault option for supportingmjs,cjs,mts, andcts(#14584)[jest-config]Loads config file from provided path inpackage.json(#14044)[jest-config]Allow loadingjest.config.ctsfiles (#14070)[jest-config]ShowrootDirin error message when apresetfails to load (#15194)[jest-config]Support loading TS config files usingesbuild-registervia 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]AddperfStatsto surface test setup overhead (#14622)[@jest/core][BREAKING] Changed--filterto accept an object with shape{ filtered: Array<string> }to match documentation (#13319)[@jest/core]Support--outputFileoption for--listTests(#14980)[@jest/core]Stringify Errors properly with--jsonflag (#15329)[@jest/core, @jest/test-sequencer][BREAKING] ExposesglobalConfig&contextstoTestSequencer(#14535, & #14543)[jest-each]Introduce%$option to add number of the test to its title (#14710)[@jest/environment][BREAKING] Remove deprecatedjest.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 thejsdomenvironment, allowing usage of custom versions of JSDOM (#14717)[jest-environment-node]Update jest environment with dispose symbolsSymbol(#14888 & #14909)[expect, @jest/expect][BREAKING] Add type inference for function parameters inCalledWithassertions (#15129)[@jest/expect-utils]Properly compare all types ofTypedArrays (#15178)[@jest/fake-timers][BREAKING] Upgrade@sinonjs/fake-timersto v13 (#14544 & #15470)[@jest/fake-timers]Exposing new modern timers functionadvanceTimersToFrame()which advances all timers by the needed milliseconds to execute callbacks currently scheduled withrequestAnimationFrame(#14598)[jest-matcher-utils]AddSERIALIZABLE_PROPERTIESto allow custom serialization of objects (#14893)[jest-mock]Add support for the Explicit Resource Management proposal to use theusingkeyword withjest.spyOn(object, methodName)(#14895)[jest-reporters]Add support for DEC mode 2026 (#15008)[jest-resolver]Supportfile://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 functionjest.advanceTimersToFrame()from@jest/fake-timers(#14598)[jest-runtime]Supportimport.meta.filenameandimport.meta.dirname(available from Node 20.11) (#14854)[jest-runtime]Supportimport.meta.resolve(#14930)[jest-runtime][BREAKING] Make it mandatory to passglobalConfigto theRuntimeconstructor (#15044)[jest-runtime]Addunstable_unmockModule(#15080)[jest-runtime]AddonGenerateMocktransformer callback for auto generated callbacks (#15433 & #15482)[jest-runtime][BREAKING] Usevm.compileFunctionovervm.Script(#15461)[@jest/schemas]Upgrade@sinclair/typeboxto v0.34 (#15450)[@jest/types]test.each(): Accept a readonly (as const) table properly (#14565)[@jest/types]Improve argument type inference passed totestanddescribecallback functions fromeachtables (#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 fromjest-snapshotinto its own package (#15095)[pretty-format][BREAKING] Do not render empty string children ('') in React plugin (#14470)Fixes
[expect]ShowAggregateErrorto display (#15346)[*]Replaceexitwithexit-x(#15399)[babel-plugin-jest-hoist]Usedenylistinstead of the deprecatedblacklistfor Babel 8 support (#14109)[babel-plugin-jest-hoist]Do not rely on buggy Babel behaviour (#15415)[expect]Check error instance type fortoThrow/toThrowError(#14576)[expect]Improve diff for failingexpect.objectContaining(#15038)[expect]UseArray.isArrayto check if an array is anArray(#15101)[expect]Fix Errorcauseassertion errors (#15339)[jest-changed-files]Print underlying errors when VCS commands fail (#15052)[jest-changed-files]Abortsl rootcall if output resembles a steam locomotive (#15053)[jest-circus][BREAKING] Prevent false test failures caused by promise rejections handled asynchronously (#14315)[jest-circus]Replace recursivemakeTestResultsimplementation with iterative one (#14760)[jest-circus]Omitexpect.hasAssertions()errors if a test already has errors (#14866)[jest-circus, jest-expect, jest-snapshot]Passtest.failingtests 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 respectrunInBandoption (#14578)[jest-config]SupporttestTimeoutin project config (#14697)[jest-config]SupportcoverageReportersin project config (#14697)[jest-config]Allowreportersin project config (#14768)[jest-config]Allow Node16/NodeNext/BundlermoduleResolutionin project's tsconfig (#14739)[@jest/create-cache-key-function]Correct the return type ofcreateCacheKey(#15159)[jest-each]Allow$keypathtemplates withnullorundefinedvalues (#14831)[@jest/expect-utils]Fix comparison ofDataView(#14408)[@jest/expect-utils][BREAKING] exclude non-enumerable in object matching (#14670)[@jest/expect-utils]Fix comparison ofURL(#14672)[@jest/expect-utils]CheckSymbolproperties 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 multiplehasteImplModulePaths (#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_importCoreModelso required core module is consistent if modified while loading (#15077)[jest-schemas, jest-types][BREAKING] Fix type oftestFailureExitCodeconfig option(#15232)[jest-util]Make sureisInteractiveworks in a browser (#14552)[pretty-format][BREAKING] PrintArrayBufferandDataViewcorrectly (#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
testPathPatternconfiguration option totestPathPatterns, which now takes a list of patterns instead of the regex.- [BREAKING]
--testPathPatternis now--testPathPatterns- [BREAKING] Specifying
testPathPatternswhen programmatically callingwatchmust be specified asnew TestPathPatterns(patterns), whereTestPathPatternscan be imported from@jest/pattern[jest-reporters, jest-runner]Unhandled errors without stack get correctly logged to console (#14619)[jest-util]Always loadmjsfiles withimport(#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 whereObjectContainingmatched non-object values. ([#15463])(#15463).
- Adds a
conditional/checkto ensure the argument passed toexpectis an object.- Add unit tests for new
ObjectContainingbehavior.- Remove
invalid/wrongtest case assertions forObjectContaining.[jest-worker]Addresses incorrect state on exit (#15610)Performance
[*][BREAKING] Bundle all of Jest's modules intoindex.js(#12348, #14550 & #14661)[jest-haste-map]Only spawn one process to check forwatchmaninstallation (#14826)[jest-runner]Better cleanupsource-map-supportafter test to resolve (minor) memory leak (#15233)[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(#15325CVE-2024-37890)[*]Increase version ofmicromatchto^4.0.7(#15082)[*][BREAKING] Drop support for Node.js versions 14, 16, 19, 21 and 23 (#14460, #15118, #15623, #15640)[*][BREAKING] Drop support fortypescript@4.3, minimum version is now5.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 toglob@10(#14509)[*]UseTypeErroroverErrorwhere appropriate (#14799)[docs]Fix typos inCHANGELOG.mdandpackages/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/coreto^7.11(#14109)[babel-jest, @jest/transform]Updatebabel-plugin-istanbulto v6 (#15156)[babel-plugin-jest-hoist]Move unnecessarydependenciestodevDependencies(#15010)[expect][BREAKING] Remove.toBeCalled(),.toBeCalledTimes(),.toBeCalledWith(),.lastCalledWith(),.nthCalledWith(),.toReturn(),.toReturnTimes(),.toReturnWith(),.lastReturnedWith(),.nthReturnedWith()and.toThrowError()matcher aliases (#14632)[jest-cli, jest-config, @jest/types][BREAKING] Remove deprecated--initargument (#14490)[jest-config, @jest/core, jest-util]Upgradeci-info(#14655)[jest-mock][BREAKING] RemoveMockFunctionMetadataType,MockFunctionMetadataandSpyInstancetypes (#14621)[@jest/reporters]Upgradeistanbul-lib-source-maps(#14924)[jest-schemas]Upgrade@sinclair/typebox(#14775)[jest-transform]Upgradewrite-file-atomic(#14274)[jest-util]Upgradepicomatchto v4 (#14653 & #14885)[docs] Append to NODE_OPTIONS, not overwrite ([#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)See the CHANGELOG.
Does any of this look wrong? Please let us know.
Commits
See the full diff on Github. The new version differs by more commits than we can show here.
↗️ @jest/source-map (indirect, 29.6.3 → 30.0.1) · Repo · Changelog
Release Notes
30.0.1
What's Changed
Features
[jest-resolver]Implement thedefaultAsyncResolver(#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 deprecatejest-replpackage (#15673)[jest-resolver]Replace customisBuiltinModulewith node'sisBuiltin(#15685)New Contributors
Full Changelog: https://github.com/jestjs/jest/blob/main/CHANGELOG.md
30.0.0
Today we are happy to announce the release of Jest 30. This release features a substantial number of changes, fixes, and improvements. While it is one of the largest major releases of Jest ever, we admit that three years for a major release is too long. In the future, we are aiming to make more frequent major releases to keep Jest great for the next decade.
If you want to skip all the news and just get going, run
npm install jest@^30.0.0and follow the migration guide: Upgrading from Jest 29 to 30.Features
[*]RenamedglobalsCleanupModetoglobalsCleanupand--waitNextEventLoopTurnForUnhandledRejectionEventsto--waitForUnhandledRejections[expect]AddArrayOfasymmetric matcher for validating array elements. (#15567)[babel-jest]Add optionexcludeJestPresetto allow opting out ofbabel-preset-jest(#15164)[expect]Revert #15038 to fixexpect(fn).toHaveBeenCalledWith(expect.objectContaining(...))when there are multiple calls (#15508)[jest-circus, jest-cli, jest-config]AddwaitNextEventLoopTurnForUnhandledRejectionEventsflag to minimise performance impact of correct detection of unhandled promise rejections introduced in #14315 (#14681)[jest-circus]Add awaitBeforeRetryoption tojest.retryTimes(#14738)[jest-circus]Add aretryImmediatelyoption tojest.retryTimes(#14696)[jest-circus, jest-jasmine2]AllowsetupFilesAfterEnvto export an async function (#10962)[jest-circus, jest-test-result]AddstartedAttimestamp inTestCaseResultObjectwithinonTestCaseResult(#15145)[jest-cli]ExportbuildArgv(#15310)[jest-config][BREAKING] Addmtsandctsto defaultmoduleFileExtensionsconfig (#14369)[jest-config][BREAKING] UpdatetestMatchandtestRegexdefault option for supportingmjs,cjs,mts, andcts(#14584)[jest-config]Loads config file from provided path inpackage.json(#14044)[jest-config]Allow loadingjest.config.ctsfiles (#14070)[jest-config]ShowrootDirin error message when apresetfails to load (#15194)[jest-config]Support loading TS config files usingesbuild-registervia 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]AddperfStatsto surface test setup overhead (#14622)[@jest/core][BREAKING] Changed--filterto accept an object with shape{ filtered: Array<string> }to match documentation (#13319)[@jest/core]Support--outputFileoption for--listTests(#14980)[@jest/core]Stringify Errors properly with--jsonflag (#15329)[@jest/core, @jest/test-sequencer][BREAKING] ExposesglobalConfig&contextstoTestSequencer(#14535, & #14543)[jest-each]Introduce%$option to add number of the test to its title (#14710)[@jest/environment][BREAKING] Remove deprecatedjest.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 thejsdomenvironment, allowing usage of custom versions of JSDOM (#14717)[jest-environment-node]Update jest environment with dispose symbolsSymbol(#14888 & #14909)[expect, @jest/expect][BREAKING] Add type inference for function parameters inCalledWithassertions (#15129)[@jest/expect-utils]Properly compare all types ofTypedArrays (#15178)[@jest/fake-timers][BREAKING] Upgrade@sinonjs/fake-timersto v13 (#14544 & #15470)[@jest/fake-timers]Exposing new modern timers functionadvanceTimersToFrame()which advances all timers by the needed milliseconds to execute callbacks currently scheduled withrequestAnimationFrame(#14598)[jest-matcher-utils]AddSERIALIZABLE_PROPERTIESto allow custom serialization of objects (#14893)[jest-mock]Add support for the Explicit Resource Management proposal to use theusingkeyword withjest.spyOn(object, methodName)(#14895)[jest-reporters]Add support for DEC mode 2026 (#15008)[jest-resolver]Supportfile://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 functionjest.advanceTimersToFrame()from@jest/fake-timers(#14598)[jest-runtime]Supportimport.meta.filenameandimport.meta.dirname(available from Node 20.11) (#14854)[jest-runtime]Supportimport.meta.resolve(#14930)[jest-runtime][BREAKING] Make it mandatory to passglobalConfigto theRuntimeconstructor (#15044)[jest-runtime]Addunstable_unmockModule(#15080)[jest-runtime]AddonGenerateMocktransformer callback for auto generated callbacks (#15433 & #15482)[jest-runtime][BREAKING] Usevm.compileFunctionovervm.Script(#15461)[@jest/schemas]Upgrade@sinclair/typeboxto v0.34 (#15450)[@jest/types]test.each(): Accept a readonly (as const) table properly (#14565)[@jest/types]Improve argument type inference passed totestanddescribecallback functions fromeachtables (#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 fromjest-snapshotinto its own package (#15095)[pretty-format][BREAKING] Do not render empty string children ('') in React plugin (#14470)Fixes
[expect]ShowAggregateErrorto display (#15346)[*]Replaceexitwithexit-x(#15399)[babel-plugin-jest-hoist]Usedenylistinstead of the deprecatedblacklistfor Babel 8 support (#14109)[babel-plugin-jest-hoist]Do not rely on buggy Babel behaviour (#15415)[expect]Check error instance type fortoThrow/toThrowError(#14576)[expect]Improve diff for failingexpect.objectContaining(#15038)[expect]UseArray.isArrayto check if an array is anArray(#15101)[expect]Fix Errorcauseassertion errors (#15339)[jest-changed-files]Print underlying errors when VCS commands fail (#15052)[jest-changed-files]Abortsl rootcall if output resembles a steam locomotive (#15053)[jest-circus][BREAKING] Prevent false test failures caused by promise rejections handled asynchronously (#14315)[jest-circus]Replace recursivemakeTestResultsimplementation with iterative one (#14760)[jest-circus]Omitexpect.hasAssertions()errors if a test already has errors (#14866)[jest-circus, jest-expect, jest-snapshot]Passtest.failingtests 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 respectrunInBandoption (#14578)[jest-config]SupporttestTimeoutin project config (#14697)[jest-config]SupportcoverageReportersin project config (#14697)[jest-config]Allowreportersin project config (#14768)[jest-config]Allow Node16/NodeNext/BundlermoduleResolutionin project's tsconfig (#14739)[@jest/create-cache-key-function]Correct the return type ofcreateCacheKey(#15159)[jest-each]Allow$keypathtemplates withnullorundefinedvalues (#14831)[@jest/expect-utils]Fix comparison ofDataView(#14408)[@jest/expect-utils][BREAKING] exclude non-enumerable in object matching (#14670)[@jest/expect-utils]Fix comparison ofURL(#14672)[@jest/expect-utils]CheckSymbolproperties 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 multiplehasteImplModulePaths (#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_importCoreModelso required core module is consistent if modified while loading (#15077)[jest-schemas, jest-types][BREAKING] Fix type oftestFailureExitCodeconfig option(#15232)[jest-util]Make sureisInteractiveworks in a browser (#14552)[pretty-format][BREAKING] PrintArrayBufferandDataViewcorrectly (#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
testPathPatternconfiguration option totestPathPatterns, which now takes a list of patterns instead of the regex.- [BREAKING]
--testPathPatternis now--testPathPatterns- [BREAKING] Specifying
testPathPatternswhen programmatically callingwatchmust be specified asnew TestPathPatterns(patterns), whereTestPathPatternscan be imported from@jest/pattern[jest-reporters, jest-runner]Unhandled errors without stack get correctly logged to console (#14619)[jest-util]Always loadmjsfiles withimport(#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 whereObjectContainingmatched non-object values. ([#15463])(#15463).
- Adds a
conditional/checkto ensure the argument passed toexpectis an object.- Add unit tests for new
ObjectContainingbehavior.- Remove
invalid/wrongtest case assertions forObjectContaining.[jest-worker]Addresses incorrect state on exit (#15610)Performance
[*][BREAKING] Bundle all of Jest's modules intoindex.js(#12348, #14550 & #14661)[jest-haste-map]Only spawn one process to check forwatchmaninstallation (#14826)[jest-runner]Better cleanupsource-map-supportafter test to resolve (minor) memory leak (#15233)[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(#15325CVE-2024-37890)[*]Increase version ofmicromatchto^4.0.7(#15082)[*][BREAKING] Drop support for Node.js versions 14, 16, 19, 21 and 23 (#14460, #15118, #15623, #15640)[*][BREAKING] Drop support fortypescript@4.3, minimum version is now5.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 toglob@10(#14509)[*]UseTypeErroroverErrorwhere appropriate (#14799)[docs]Fix typos inCHANGELOG.mdandpackages/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/coreto^7.11(#14109)[babel-jest, @jest/transform]Updatebabel-plugin-istanbulto v6 (#15156)[babel-plugin-jest-hoist]Move unnecessarydependenciestodevDependencies(#15010)[expect][BREAKING] Remove.toBeCalled(),.toBeCalledTimes(),.toBeCalledWith(),.lastCalledWith(),.nthCalledWith(),.toReturn(),.toReturnTimes(),.toReturnWith(),.lastReturnedWith(),.nthReturnedWith()and.toThrowError()matcher aliases (#14632)[jest-cli, jest-config, @jest/types][BREAKING] Remove deprecated--initargument (#14490)[jest-config, @jest/core, jest-util]Upgradeci-info(#14655)[jest-mock][BREAKING] RemoveMockFunctionMetadataType,MockFunctionMetadataandSpyInstancetypes (#14621)[@jest/reporters]Upgradeistanbul-lib-source-maps(#14924)[jest-schemas]Upgrade@sinclair/typebox(#14775)[jest-transform]Upgradewrite-file-atomic(#14274)[jest-util]Upgradepicomatchto v4 (#14653 & #14885)[docs] Append to NODE_OPTIONS, not overwrite ([#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)See the CHANGELOG.
Does any of this look wrong? Please let us know.
Commits
See the full diff on Github. The new version differs by more commits than we can show here.
↗️ @jest/test-sequencer (indirect, 29.7.0 → 30.2.0) · Repo · Changelog
Release Notes
30.2.0
Chore & Maintenance
[*]Update example repo for testing React Native projects (#15832)[*]Updatejest-watch-typeaheadto v3 (#15830)Features
[jest-environment-jsdom-abstract]Add support for JSDOM v27 (#15834)Fixes
30.1.3
Fixes
- Fix
unstable_mockModulewithnode:prefixed core modules.
30.1.2 (from changelog)
Fixes
[jest-snapshot-utils]Correct snapshot header regexp to work with newline across OSes (#15803)
30.1.1
Fixes
[jest-snapshot-utils]Fix deprecated goo.gl snapshot warning not handling Windows end-of-line sequences (#15800)
30.1.0
Features
[jest-leak-detector]Configurable GC aggressiveness regarding to V8 heap snapshot generation (#15793)[jest-runtime]Reduce redundant ReferenceError messages[jest-core]Include test modules that failed to load when --onlyFailures is activeFixes
- `[jest-snapshot-utils] Fix deprecated goo.gl snapshot guide link not getting replaced with fully canonical URL (#15787)
[jest-circus]Fixit.concurrentnot working withdescribe.skip(#15765)[jest-snapshot]Fix mangled inline snapshot updates when used with Prettier 3 and CRLF line endings[jest-runtime]Importing from@jest/globalsin more than one file no longer breaks relative paths (#15772)Chore
[expect]Update docblock fortoContain()to display info on substring check (#15789)
30.0.5 (from changelog)
Features
[jest-config]AllowtestMatchto take a string value[jest-worker]LetworkerIdleMemoryLimitaccept 0 to always restart worker child processesFixes
[expect]Fixbiginterror (#15702)
30.0.4 (from changelog)
Features
[expect]TheInversetype is now exported (#15714)[expect]feat: supportasync functionsintoBe(#15704)Fixes
30.0.2
What's Changed
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)Full Changelog: https://github.com/jestjs/jest/blob/main/CHANGELOG.md
30.0.1
What's Changed
Features
[jest-resolver]Implement thedefaultAsyncResolver(#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 deprecatejest-replpackage (#15673)[jest-resolver]Replace customisBuiltinModulewith node'sisBuiltin(#15685)New Contributors
Full Changelog: https://github.com/jestjs/jest/blob/main/CHANGELOG.md
30.0.0
Today we are happy to announce the release of Jest 30. This release features a substantial number of changes, fixes, and improvements. While it is one of the largest major releases of Jest ever, we admit that three years for a major release is too long. In the future, we are aiming to make more frequent major releases to keep Jest great for the next decade.
If you want to skip all the news and just get going, run
npm install jest@^30.0.0and follow the migration guide: Upgrading from Jest 29 to 30.Features
[*]RenamedglobalsCleanupModetoglobalsCleanupand--waitNextEventLoopTurnForUnhandledRejectionEventsto--waitForUnhandledRejections[expect]AddArrayOfasymmetric matcher for validating array elements. (#15567)[babel-jest]Add optionexcludeJestPresetto allow opting out ofbabel-preset-jest(#15164)[expect]Revert #15038 to fixexpect(fn).toHaveBeenCalledWith(expect.objectContaining(...))when there are multiple calls (#15508)[jest-circus, jest-cli, jest-config]AddwaitNextEventLoopTurnForUnhandledRejectionEventsflag to minimise performance impact of correct detection of unhandled promise rejections introduced in #14315 (#14681)[jest-circus]Add awaitBeforeRetryoption tojest.retryTimes(#14738)[jest-circus]Add aretryImmediatelyoption tojest.retryTimes(#14696)[jest-circus, jest-jasmine2]AllowsetupFilesAfterEnvto export an async function (#10962)[jest-circus, jest-test-result]AddstartedAttimestamp inTestCaseResultObjectwithinonTestCaseResult(#15145)[jest-cli]ExportbuildArgv(#15310)[jest-config][BREAKING] Addmtsandctsto defaultmoduleFileExtensionsconfig (#14369)[jest-config][BREAKING] UpdatetestMatchandtestRegexdefault option for supportingmjs,cjs,mts, andcts(#14584)[jest-config]Loads config file from provided path inpackage.json(#14044)[jest-config]Allow loadingjest.config.ctsfiles (#14070)[jest-config]ShowrootDirin error message when apresetfails to load (#15194)[jest-config]Support loading TS config files usingesbuild-registervia 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]AddperfStatsto surface test setup overhead (#14622)[@jest/core][BREAKING] Changed--filterto accept an object with shape{ filtered: Array<string> }to match documentation (#13319)[@jest/core]Support--outputFileoption for--listTests(#14980)[@jest/core]Stringify Errors properly with--jsonflag (#15329)[@jest/core, @jest/test-sequencer][BREAKING] ExposesglobalConfig&contextstoTestSequencer(#14535, & #14543)[jest-each]Introduce%$option to add number of the test to its title (#14710)[@jest/environment][BREAKING] Remove deprecatedjest.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 thejsdomenvironment, allowing usage of custom versions of JSDOM (#14717)[jest-environment-node]Update jest environment with dispose symbolsSymbol(#14888 & #14909)[expect, @jest/expect][BREAKING] Add type inference for function parameters inCalledWithassertions (#15129)[@jest/expect-utils]Properly compare all types ofTypedArrays (#15178)[@jest/fake-timers][BREAKING] Upgrade@sinonjs/fake-timersto v13 (#14544 & #15470)[@jest/fake-timers]Exposing new modern timers functionadvanceTimersToFrame()which advances all timers by the needed milliseconds to execute callbacks currently scheduled withrequestAnimationFrame(#14598)[jest-matcher-utils]AddSERIALIZABLE_PROPERTIESto allow custom serialization of objects (#14893)[jest-mock]Add support for the Explicit Resource Management proposal to use theusingkeyword withjest.spyOn(object, methodName)(#14895)[jest-reporters]Add support for DEC mode 2026 (#15008)[jest-resolver]Supportfile://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 functionjest.advanceTimersToFrame()from@jest/fake-timers(#14598)[jest-runtime]Supportimport.meta.filenameandimport.meta.dirname(available from Node 20.11) (#14854)[jest-runtime]Supportimport.meta.resolve(#14930)[jest-runtime][BREAKING] Make it mandatory to passglobalConfigto theRuntimeconstructor (#15044)[jest-runtime]Addunstable_unmockModule(#15080)[jest-runtime]AddonGenerateMocktransformer callback for auto generated callbacks (#15433 & #15482)[jest-runtime][BREAKING] Usevm.compileFunctionovervm.Script(#15461)[@jest/schemas]Upgrade@sinclair/typeboxto v0.34 (#15450)[@jest/types]test.each(): Accept a readonly (as const) table properly (#14565)[@jest/types]Improve argument type inference passed totestanddescribecallback functions fromeachtables (#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 fromjest-snapshotinto its own package (#15095)[pretty-format][BREAKING] Do not render empty string children ('') in React plugin (#14470)Fixes
[expect]ShowAggregateErrorto display (#15346)[*]Replaceexitwithexit-x(#15399)[babel-plugin-jest-hoist]Usedenylistinstead of the deprecatedblacklistfor Babel 8 support (#14109)[babel-plugin-jest-hoist]Do not rely on buggy Babel behaviour (#15415)[expect]Check error instance type fortoThrow/toThrowError(#14576)[expect]Improve diff for failingexpect.objectContaining(#15038)[expect]UseArray.isArrayto check if an array is anArray(#15101)[expect]Fix Errorcauseassertion errors (#15339)[jest-changed-files]Print underlying errors when VCS commands fail (#15052)[jest-changed-files]Abortsl rootcall if output resembles a steam locomotive (#15053)[jest-circus][BREAKING] Prevent false test failures caused by promise rejections handled asynchronously (#14315)[jest-circus]Replace recursivemakeTestResultsimplementation with iterative one (#14760)[jest-circus]Omitexpect.hasAssertions()errors if a test already has errors (#14866)[jest-circus, jest-expect, jest-snapshot]Passtest.failingtests 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 respectrunInBandoption (#14578)[jest-config]SupporttestTimeoutin project config (#14697)[jest-config]SupportcoverageReportersin project config (#14697)[jest-config]Allowreportersin project config (#14768)[jest-config]Allow Node16/NodeNext/BundlermoduleResolutionin project's tsconfig (#14739)[@jest/create-cache-key-function]Correct the return type ofcreateCacheKey(#15159)[jest-each]Allow$keypathtemplates withnullorundefinedvalues (#14831)[@jest/expect-utils]Fix comparison ofDataView(#14408)[@jest/expect-utils][BREAKING] exclude non-enumerable in object matching (#14670)[@jest/expect-utils]Fix comparison ofURL(#14672)[@jest/expect-utils]CheckSymbolproperties 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 multiplehasteImplModulePaths (#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_importCoreModelso required core module is consistent if modified while loading (#15077)[jest-schemas, jest-types][BREAKING] Fix type oftestFailureExitCodeconfig option(#15232)[jest-util]Make sureisInteractiveworks in a browser (#14552)[pretty-format][BREAKING] PrintArrayBufferandDataViewcorrectly (#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
testPathPatternconfiguration option totestPathPatterns, which now takes a list of patterns instead of the regex.- [BREAKING]
--testPathPatternis now--testPathPatterns- [BREAKING] Specifying
testPathPatternswhen programmatically callingwatchmust be specified asnew TestPathPatterns(patterns), whereTestPathPatternscan be imported from@jest/pattern[jest-reporters, jest-runner]Unhandled errors without stack get correctly logged to console (#14619)[jest-util]Always loadmjsfiles withimport(#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 whereObjectContainingmatched non-object values. ([#15463])(#15463).
- Adds a
conditional/checkto ensure the argument passed toexpectis an object.- Add unit tests for new
ObjectContainingbehavior.- Remove
invalid/wrongtest case assertions forObjectContaining.[jest-worker]Addresses incorrect state on exit (#15610)Performance
[*][BREAKING] Bundle all of Jest's modules intoindex.js(#12348, #14550 & #14661)[jest-haste-map]Only spawn one process to check forwatchmaninstallation (#14826)[jest-runner]Better cleanupsource-map-supportafter test to resolve (minor) memory leak (#15233)[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(#15325CVE-2024-37890)[*]Increase version ofmicromatchto^4.0.7(#15082)[*][BREAKING] Drop support for Node.js versions 14, 16, 19, 21 and 23 (#14460, #15118, #15623, #15640)[*][BREAKING] Drop support fortypescript@4.3, minimum version is now5.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 toglob@10(#14509)[*]UseTypeErroroverErrorwhere appropriate (#14799)[docs]Fix typos inCHANGELOG.mdandpackages/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/coreto^7.11(#14109)[babel-jest, @jest/transform]Updatebabel-plugin-istanbulto v6 (#15156)[babel-plugin-jest-hoist]Move unnecessarydependenciestodevDependencies(#15010)[expect][BREAKING] Remove.toBeCalled(),.toBeCalledTimes(),.toBeCalledWith(),.lastCalledWith(),.nthCalledWith(),.toReturn(),.toReturnTimes(),.toReturnWith(),.lastReturnedWith(),.nthReturnedWith()and.toThrowError()matcher aliases (#14632)[jest-cli, jest-config, @jest/types][BREAKING] Remove deprecated--initargument (#14490)[jest-config, @jest/core, jest-util]Upgradeci-info(#14655)[jest-mock][BREAKING] RemoveMockFunctionMetadataType,MockFunctionMetadataandSpyInstancetypes (#14621)[@jest/reporters]Upgradeistanbul-lib-source-maps(#14924)[jest-schemas]Upgrade@sinclair/typebox(#14775)[jest-transform]Upgradewrite-file-atomic(#14274)[jest-util]Upgradepicomatchto v4 (#14653 & #14885)[docs] Append to NODE_OPTIONS, not overwrite ([#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)See the CHANGELOG.
Does any of this look wrong? Please let us know.
Commits
See the full diff on Github. The new version differs by more commits than we can show here.
↗️ @jest/transform (indirect, 29.7.0 → 30.2.0) · Repo · Changelog
Release Notes
30.2.0
Chore & Maintenance
[*]Update example repo for testing React Native projects (#15832)[*]Updatejest-watch-typeaheadto v3 (#15830)Features
[jest-environment-jsdom-abstract]Add support for JSDOM v27 (#15834)Fixes
30.1.1
Fixes
[jest-snapshot-utils]Fix deprecated goo.gl snapshot warning not handling Windows end-of-line sequences (#15800)
30.1.0
Features
[jest-leak-detector]Configurable GC aggressiveness regarding to V8 heap snapshot generation (#15793)[jest-runtime]Reduce redundant ReferenceError messages[jest-core]Include test modules that failed to load when --onlyFailures is activeFixes
- `[jest-snapshot-utils] Fix deprecated goo.gl snapshot guide link not getting replaced with fully canonical URL (#15787)
[jest-circus]Fixit.concurrentnot working withdescribe.skip(#15765)[jest-snapshot]Fix mangled inline snapshot updates when used with Prettier 3 and CRLF line endings[jest-runtime]Importing from@jest/globalsin more than one file no longer breaks relative paths (#15772)Chore
[expect]Update docblock fortoContain()to display info on substring check (#15789)
30.0.5 (from changelog)
Features
[jest-config]AllowtestMatchto take a string value[jest-worker]LetworkerIdleMemoryLimitaccept 0 to always restart worker child processesFixes
[expect]Fixbiginterror (#15702)
30.0.4 (from changelog)
Features
[expect]TheInversetype is now exported (#15714)[expect]feat: supportasync functionsintoBe(#15704)Fixes
30.0.2
What's Changed
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)Full Changelog: https://github.com/jestjs/jest/blob/main/CHANGELOG.md
30.0.1
What's Changed
Features
[jest-resolver]Implement thedefaultAsyncResolver(#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 deprecatejest-replpackage (#15673)[jest-resolver]Replace customisBuiltinModulewith node'sisBuiltin(#15685)New Contributors
Full Changelog: https://github.com/jestjs/jest/blob/main/CHANGELOG.md
30.0.0
Today we are happy to announce the release of Jest 30. This release features a substantial number of changes, fixes, and improvements. While it is one of the largest major releases of Jest ever, we admit that three years for a major release is too long. In the future, we are aiming to make more frequent major releases to keep Jest great for the next decade.
If you want to skip all the news and just get going, run
npm install jest@^30.0.0and follow the migration guide: Upgrading from Jest 29 to 30.Features
[*]RenamedglobalsCleanupModetoglobalsCleanupand--waitNextEventLoopTurnForUnhandledRejectionEventsto--waitForUnhandledRejections[expect]AddArrayOfasymmetric matcher for validating array elements. (#15567)[babel-jest]Add optionexcludeJestPresetto allow opting out ofbabel-preset-jest(#15164)[expect]Revert #15038 to fixexpect(fn).toHaveBeenCalledWith(expect.objectContaining(...))when there are multiple calls (#15508)[jest-circus, jest-cli, jest-config]AddwaitNextEventLoopTurnForUnhandledRejectionEventsflag to minimise performance impact of correct detection of unhandled promise rejections introduced in #14315 (#14681)[jest-circus]Add awaitBeforeRetryoption tojest.retryTimes(#14738)[jest-circus]Add aretryImmediatelyoption tojest.retryTimes(#14696)[jest-circus, jest-jasmine2]AllowsetupFilesAfterEnvto export an async function (#10962)[jest-circus, jest-test-result]AddstartedAttimestamp inTestCaseResultObjectwithinonTestCaseResult(#15145)[jest-cli]ExportbuildArgv(#15310)[jest-config][BREAKING] Addmtsandctsto defaultmoduleFileExtensionsconfig (#14369)[jest-config][BREAKING] UpdatetestMatchandtestRegexdefault option for supportingmjs,cjs,mts, andcts(#14584)[jest-config]Loads config file from provided path inpackage.json(#14044)[jest-config]Allow loadingjest.config.ctsfiles (#14070)[jest-config]ShowrootDirin error message when apresetfails to load (#15194)[jest-config]Support loading TS config files usingesbuild-registervia 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]AddperfStatsto surface test setup overhead (#14622)[@jest/core][BREAKING] Changed--filterto accept an object with shape{ filtered: Array<string> }to match documentation (#13319)[@jest/core]Support--outputFileoption for--listTests(#14980)[@jest/core]Stringify Errors properly with--jsonflag (#15329)[@jest/core, @jest/test-sequencer][BREAKING] ExposesglobalConfig&contextstoTestSequencer(#14535, & #14543)[jest-each]Introduce%$option to add number of the test to its title (#14710)[@jest/environment][BREAKING] Remove deprecatedjest.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 thejsdomenvironment, allowing usage of custom versions of JSDOM (#14717)[jest-environment-node]Update jest environment with dispose symbolsSymbol(#14888 & #14909)[expect, @jest/expect][BREAKING] Add type inference for function parameters inCalledWithassertions (#15129)[@jest/expect-utils]Properly compare all types ofTypedArrays (#15178)[@jest/fake-timers][BREAKING] Upgrade@sinonjs/fake-timersto v13 (#14544 & #15470)[@jest/fake-timers]Exposing new modern timers functionadvanceTimersToFrame()which advances all timers by the needed milliseconds to execute callbacks currently scheduled withrequestAnimationFrame(#14598)[jest-matcher-utils]AddSERIALIZABLE_PROPERTIESto allow custom serialization of objects (#14893)[jest-mock]Add support for the Explicit Resource Management proposal to use theusingkeyword withjest.spyOn(object, methodName)(#14895)[jest-reporters]Add support for DEC mode 2026 (#15008)[jest-resolver]Supportfile://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 functionjest.advanceTimersToFrame()from@jest/fake-timers(#14598)[jest-runtime]Supportimport.meta.filenameandimport.meta.dirname(available from Node 20.11) (#14854)[jest-runtime]Supportimport.meta.resolve(#14930)[jest-runtime][BREAKING] Make it mandatory to passglobalConfigto theRuntimeconstructor (#15044)[jest-runtime]Addunstable_unmockModule(#15080)[jest-runtime]AddonGenerateMocktransformer callback for auto generated callbacks (#15433 & #15482)[jest-runtime][BREAKING] Usevm.compileFunctionovervm.Script(#15461)[@jest/schemas]Upgrade@sinclair/typeboxto v0.34 (#15450)[@jest/types]test.each(): Accept a readonly (as const) table properly (#14565)[@jest/types]Improve argument type inference passed totestanddescribecallback functions fromeachtables (#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 fromjest-snapshotinto its own package (#15095)[pretty-format][BREAKING] Do not render empty string children ('') in React plugin (#14470)Fixes
[expect]ShowAggregateErrorto display (#15346)[*]Replaceexitwithexit-x(#15399)[babel-plugin-jest-hoist]Usedenylistinstead of the deprecatedblacklistfor Babel 8 support (#14109)[babel-plugin-jest-hoist]Do not rely on buggy Babel behaviour (#15415)[expect]Check error instance type fortoThrow/toThrowError(#14576)[expect]Improve diff for failingexpect.objectContaining(#15038)[expect]UseArray.isArrayto check if an array is anArray(#15101)[expect]Fix Errorcauseassertion errors (#15339)[jest-changed-files]Print underlying errors when VCS commands fail (#15052)[jest-changed-files]Abortsl rootcall if output resembles a steam locomotive (#15053)[jest-circus][BREAKING] Prevent false test failures caused by promise rejections handled asynchronously (#14315)[jest-circus]Replace recursivemakeTestResultsimplementation with iterative one (#14760)[jest-circus]Omitexpect.hasAssertions()errors if a test already has errors (#14866)[jest-circus, jest-expect, jest-snapshot]Passtest.failingtests 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 respectrunInBandoption (#14578)[jest-config]SupporttestTimeoutin project config (#14697)[jest-config]SupportcoverageReportersin project config (#14697)[jest-config]Allowreportersin project config (#14768)[jest-config]Allow Node16/NodeNext/BundlermoduleResolutionin project's tsconfig (#14739)[@jest/create-cache-key-function]Correct the return type ofcreateCacheKey(#15159)[jest-each]Allow$keypathtemplates withnullorundefinedvalues (#14831)[@jest/expect-utils]Fix comparison ofDataView(#14408)[@jest/expect-utils][BREAKING] exclude non-enumerable in object matching (#14670)[@jest/expect-utils]Fix comparison ofURL(#14672)[@jest/expect-utils]CheckSymbolproperties 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 multiplehasteImplModulePaths (#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_importCoreModelso required core module is consistent if modified while loading (#15077)[jest-schemas, jest-types][BREAKING] Fix type oftestFailureExitCodeconfig option(#15232)[jest-util]Make sureisInteractiveworks in a browser (#14552)[pretty-format][BREAKING] PrintArrayBufferandDataViewcorrectly (#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
testPathPatternconfiguration option totestPathPatterns, which now takes a list of patterns instead of the regex.- [BREAKING]
--testPathPatternis now--testPathPatterns- [BREAKING] Specifying
testPathPatternswhen programmatically callingwatchmust be specified asnew TestPathPatterns(patterns), whereTestPathPatternscan be imported from@jest/pattern[jest-reporters, jest-runner]Unhandled errors without stack get correctly logged to console (#14619)[jest-util]Always loadmjsfiles withimport(#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 whereObjectContainingmatched non-object values. ([#15463])(#15463).
- Adds a
conditional/checkto ensure the argument passed toexpectis an object.- Add unit tests for new
ObjectContainingbehavior.- Remove
invalid/wrongtest case assertions forObjectContaining.[jest-worker]Addresses incorrect state on exit (#15610)Performance
[*][BREAKING] Bundle all of Jest's modules intoindex.js(#12348, #14550 & #14661)[jest-haste-map]Only spawn one process to check forwatchmaninstallation (#14826)[jest-runner]Better cleanupsource-map-supportafter test to resolve (minor) memory leak (#15233)[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(#15325CVE-2024-37890)[*]Increase version ofmicromatchto^4.0.7(#15082)[*][BREAKING] Drop support for Node.js versions 14, 16, 19, 21 and 23 (#14460, #15118, #15623, #15640)[*][BREAKING] Drop support fortypescript@4.3, minimum version is now5.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 toglob@10(#14509)[*]UseTypeErroroverErrorwhere appropriate (#14799)[docs]Fix typos inCHANGELOG.mdandpackages/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/coreto^7.11(#14109)[babel-jest, @jest/transform]Updatebabel-plugin-istanbulto v6 (#15156)[babel-plugin-jest-hoist]Move unnecessarydependenciestodevDependencies(#15010)[expect][BREAKING] Remove.toBeCalled(),.toBeCalledTimes(),.toBeCalledWith(),.lastCalledWith(),.nthCalledWith(),.toReturn(),.toReturnTimes(),.toReturnWith(),.lastReturnedWith(),.nthReturnedWith()and.toThrowError()matcher aliases (#14632)[jest-cli, jest-config, @jest/types][BREAKING] Remove deprecated--initargument (#14490)[jest-config, @jest/core, jest-util]Upgradeci-info(#14655)[jest-mock][BREAKING] RemoveMockFunctionMetadataType,MockFunctionMetadataandSpyInstancetypes (#14621)[@jest/reporters]Upgradeistanbul-lib-source-maps(#14924)[jest-schemas]Upgrade@sinclair/typebox(#14775)[jest-transform]Upgradewrite-file-atomic(#14274)[jest-util]Upgradepicomatchto v4 (#14653 & #14885)[docs] Append to NODE_OPTIONS, not overwrite ([#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)See the CHANGELOG.
Does any of this look wrong? Please let us know.
Commits
See the full diff on Github. The new version differs by more commits than we can show here.
↗️ @jest/types (indirect, 29.6.3 → 30.2.0) · Repo · Changelog
Release Notes
30.2.0
Chore & Maintenance
[*]Update example repo for testing React Native projects (#15832)[*]Updatejest-watch-typeaheadto v3 (#15830)Features
[jest-environment-jsdom-abstract]Add support for JSDOM v27 (#15834)Fixes
30.0.5 (from changelog)
Features
[jest-config]AllowtestMatchto take a string value[jest-worker]LetworkerIdleMemoryLimitaccept 0 to always restart worker child processesFixes
[expect]Fixbiginterror (#15702)
30.0.1
What's Changed
Features
[jest-resolver]Implement thedefaultAsyncResolver(#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 deprecatejest-replpackage (#15673)[jest-resolver]Replace customisBuiltinModulewith node'sisBuiltin(#15685)New Contributors
Full Changelog: https://github.com/jestjs/jest/blob/main/CHANGELOG.md
30.0.0
Today we are happy to announce the release of Jest 30. This release features a substantial number of changes, fixes, and improvements. While it is one of the largest major releases of Jest ever, we admit that three years for a major release is too long. In the future, we are aiming to make more frequent major releases to keep Jest great for the next decade.
If you want to skip all the news and just get going, run
npm install jest@^30.0.0and follow the migration guide: Upgrading from Jest 29 to 30.Features
[*]RenamedglobalsCleanupModetoglobalsCleanupand--waitNextEventLoopTurnForUnhandledRejectionEventsto--waitForUnhandledRejections[expect]AddArrayOfasymmetric matcher for validating array elements. (#15567)[babel-jest]Add optionexcludeJestPresetto allow opting out ofbabel-preset-jest(#15164)[expect]Revert #15038 to fixexpect(fn).toHaveBeenCalledWith(expect.objectContaining(...))when there are multiple calls (#15508)[jest-circus, jest-cli, jest-config]AddwaitNextEventLoopTurnForUnhandledRejectionEventsflag to minimise performance impact of correct detection of unhandled promise rejections introduced in #14315 (#14681)[jest-circus]Add awaitBeforeRetryoption tojest.retryTimes(#14738)[jest-circus]Add aretryImmediatelyoption tojest.retryTimes(#14696)[jest-circus, jest-jasmine2]AllowsetupFilesAfterEnvto export an async function (#10962)[jest-circus, jest-test-result]AddstartedAttimestamp inTestCaseResultObjectwithinonTestCaseResult(#15145)[jest-cli]ExportbuildArgv(#15310)[jest-config][BREAKING] Addmtsandctsto defaultmoduleFileExtensionsconfig (#14369)[jest-config][BREAKING] UpdatetestMatchandtestRegexdefault option for supportingmjs,cjs,mts, andcts(#14584)[jest-config]Loads config file from provided path inpackage.json(#14044)[jest-config]Allow loadingjest.config.ctsfiles (#14070)[jest-config]ShowrootDirin error message when apresetfails to load (#15194)[jest-config]Support loading TS config files usingesbuild-registervia 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]AddperfStatsto surface test setup overhead (#14622)[@jest/core][BREAKING] Changed--filterto accept an object with shape{ filtered: Array<string> }to match documentation (#13319)[@jest/core]Support--outputFileoption for--listTests(#14980)[@jest/core]Stringify Errors properly with--jsonflag (#15329)[@jest/core, @jest/test-sequencer][BREAKING] ExposesglobalConfig&contextstoTestSequencer(#14535, & #14543)[jest-each]Introduce%$option to add number of the test to its title (#14710)[@jest/environment][BREAKING] Remove deprecatedjest.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 thejsdomenvironment, allowing usage of custom versions of JSDOM (#14717)[jest-environment-node]Update jest environment with dispose symbolsSymbol(#14888 & #14909)[expect, @jest/expect][BREAKING] Add type inference for function parameters inCalledWithassertions (#15129)[@jest/expect-utils]Properly compare all types ofTypedArrays (#15178)[@jest/fake-timers][BREAKING] Upgrade@sinonjs/fake-timersto v13 (#14544 & #15470)[@jest/fake-timers]Exposing new modern timers functionadvanceTimersToFrame()which advances all timers by the needed milliseconds to execute callbacks currently scheduled withrequestAnimationFrame(#14598)[jest-matcher-utils]AddSERIALIZABLE_PROPERTIESto allow custom serialization of objects (#14893)[jest-mock]Add support for the Explicit Resource Management proposal to use theusingkeyword withjest.spyOn(object, methodName)(#14895)[jest-reporters]Add support for DEC mode 2026 (#15008)[jest-resolver]Supportfile://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 functionjest.advanceTimersToFrame()from@jest/fake-timers(#14598)[jest-runtime]Supportimport.meta.filenameandimport.meta.dirname(available from Node 20.11) (#14854)[jest-runtime]Supportimport.meta.resolve(#14930)[jest-runtime][BREAKING] Make it mandatory to passglobalConfigto theRuntimeconstructor (#15044)[jest-runtime]Addunstable_unmockModule(#15080)[jest-runtime]AddonGenerateMocktransformer callback for auto generated callbacks (#15433 & #15482)[jest-runtime][BREAKING] Usevm.compileFunctionovervm.Script(#15461)[@jest/schemas]Upgrade@sinclair/typeboxto v0.34 (#15450)[@jest/types]test.each(): Accept a readonly (as const) table properly (#14565)[@jest/types]Improve argument type inference passed totestanddescribecallback functions fromeachtables (#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 fromjest-snapshotinto its own package (#15095)[pretty-format][BREAKING] Do not render empty string children ('') in React plugin (#14470)Fixes
[expect]ShowAggregateErrorto display (#15346)[*]Replaceexitwithexit-x(#15399)[babel-plugin-jest-hoist]Usedenylistinstead of the deprecatedblacklistfor Babel 8 support (#14109)[babel-plugin-jest-hoist]Do not rely on buggy Babel behaviour (#15415)[expect]Check error instance type fortoThrow/toThrowError(#14576)[expect]Improve diff for failingexpect.objectContaining(#15038)[expect]UseArray.isArrayto check if an array is anArray(#15101)[expect]Fix Errorcauseassertion errors (#15339)[jest-changed-files]Print underlying errors when VCS commands fail (#15052)[jest-changed-files]Abortsl rootcall if output resembles a steam locomotive (#15053)[jest-circus][BREAKING] Prevent false test failures caused by promise rejections handled asynchronously (#14315)[jest-circus]Replace recursivemakeTestResultsimplementation with iterative one (#14760)[jest-circus]Omitexpect.hasAssertions()errors if a test already has errors (#14866)[jest-circus, jest-expect, jest-snapshot]Passtest.failingtests 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 respectrunInBandoption (#14578)[jest-config]SupporttestTimeoutin project config (#14697)[jest-config]SupportcoverageReportersin project config (#14697)[jest-config]Allowreportersin project config (#14768)[jest-config]Allow Node16/NodeNext/BundlermoduleResolutionin project's tsconfig (#14739)[@jest/create-cache-key-function]Correct the return type ofcreateCacheKey(#15159)[jest-each]Allow$keypathtemplates withnullorundefinedvalues (#14831)[@jest/expect-utils]Fix comparison ofDataView(#14408)[@jest/expect-utils][BREAKING] exclude non-enumerable in object matching (#14670)[@jest/expect-utils]Fix comparison ofURL(#14672)[@jest/expect-utils]CheckSymbolproperties 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 multiplehasteImplModulePaths (#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_importCoreModelso required core module is consistent if modified while loading (#15077)[jest-schemas, jest-types][BREAKING] Fix type oftestFailureExitCodeconfig option(#15232)[jest-util]Make sureisInteractiveworks in a browser (#14552)[pretty-format][BREAKING] PrintArrayBufferandDataViewcorrectly (#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
testPathPatternconfiguration option totestPathPatterns, which now takes a list of patterns instead of the regex.- [BREAKING]
--testPathPatternis now--testPathPatterns- [BREAKING] Specifying
testPathPatternswhen programmatically callingwatchmust be specified asnew TestPathPatterns(patterns), whereTestPathPatternscan be imported from@jest/pattern[jest-reporters, jest-runner]Unhandled errors without stack get correctly logged to console (#14619)[jest-util]Always loadmjsfiles withimport(#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 whereObjectContainingmatched non-object values. ([#15463])(#15463).
- Adds a
conditional/checkto ensure the argument passed toexpectis an object.- Add unit tests for new
ObjectContainingbehavior.- Remove
invalid/wrongtest case assertions forObjectContaining.[jest-worker]Addresses incorrect state on exit (#15610)Performance
[*][BREAKING] Bundle all of Jest's modules intoindex.js(#12348, #14550 & #14661)[jest-haste-map]Only spawn one process to check forwatchmaninstallation (#14826)[jest-runner]Better cleanupsource-map-supportafter test to resolve (minor) memory leak (#15233)[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(#15325CVE-2024-37890)[*]Increase version ofmicromatchto^4.0.7(#15082)[*][BREAKING] Drop support for Node.js versions 14, 16, 19, 21 and 23 (#14460, #15118, #15623, #15640)[*][BREAKING] Drop support fortypescript@4.3, minimum version is now5.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 toglob@10(#14509)[*]UseTypeErroroverErrorwhere appropriate (#14799)[docs]Fix typos inCHANGELOG.mdandpackages/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/coreto^7.11(#14109)[babel-jest, @jest/transform]Updatebabel-plugin-istanbulto v6 (#15156)[babel-plugin-jest-hoist]Move unnecessarydependenciestodevDependencies(#15010)[expect][BREAKING] Remove.toBeCalled(),.toBeCalledTimes(),.toBeCalledWith(),.lastCalledWith(),.nthCalledWith(),.toReturn(),.toReturnTimes(),.toReturnWith(),.lastReturnedWith(),.nthReturnedWith()and.toThrowError()matcher aliases (#14632)[jest-cli, jest-config, @jest/types][BREAKING] Remove deprecated--initargument (#14490)[jest-config, @jest/core, jest-util]Upgradeci-info(#14655)[jest-mock][BREAKING] RemoveMockFunctionMetadataType,MockFunctionMetadataandSpyInstancetypes (#14621)[@jest/reporters]Upgradeistanbul-lib-source-maps(#14924)[jest-schemas]Upgrade@sinclair/typebox(#14775)[jest-transform]Upgradewrite-file-atomic(#14274)[jest-util]Upgradepicomatchto v4 (#14653 & #14885)[docs] Append to NODE_OPTIONS, not overwrite ([#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)See the CHANGELOG.
Does any of this look wrong? Please let us know.
Commits
See the full diff on Github. The new version differs by more commits than we can show here.
↗️ @sinclair/typebox (indirect, 0.27.8 → 0.34.41) · Repo · Changelog
↗️ @sinonjs/fake-timers (indirect, 10.3.0 → 13.0.5) · Repo · Changelog
Release Notes
13.0.5 (from changelog)
- Ensure checks based Object.keys length pass for fake Dates (#513)
13.0.4 (from changelog)
- Fix constructor-based checks for fake Date no longer pass after installing (#512) (patches the patch)
13.0.3 (from changelog)
- Ensure checks based on the constructor property passes for fake Dates (#511)
13.0.2 (from changelog)
13.0.1 (from changelog)
- Add a guard to prevent test from failing in Puppeteer
- Add a missing test on using timers not present on a custom global
- Fix toString() output
13.0.0 (from changelog)
- fix: fake all supported timers by default (#323) (BREAKING)
12.0.0 (from changelog)
11.3.1 (from changelog)
- Prevent releasing on branches other than 'main'
- Enable saucelabs tests
- chore: security audit fix
- Remove Husky deprecation messsage that came in v9
11.2.2 (from changelog)
- Fix for #483 and jestjs/jest#14549 (#485): micro-tasks are run even when timers are empty
11.2.1 (from changelog)
- no-op to fix a broken release process
11.1.0 (from changelog)
- favor the constructor of the performance instance if it exists (#478)
- Bump tough-cookie from 4.1.2 to 4.1.3 (#473)
- Remove IE specific hacks (#477)
- feat: mock intl api (#474)
- upgrade node (#476) and EOL Node 14
- Bump word-wrap from 1.2.3 to 1.2.4 (#475)
- Updated release files for 11.0.0
- Updated release files for 10.2.0
- Add mocks to NodeJS "timers" module (#467)
11.0.0 (from changelog)
- Re-release 10.2.0 as a new major version as mocking Node "timers" module broke some setups
Does any of this look wrong? Please let us know.
Commits
See the full diff on Github. The new version differs by more commits than we can show here.
↗️ @types/babel__generator (indirect, 7.6.8 → 7.27.0) · Repo
Sorry, we couldn’t find anything useful about this release.
↗️ @types/babel__traverse (indirect, 7.20.6 → 7.28.0) · Repo
Sorry, we couldn’t find anything useful about this release.
↗️ ansi-regex (indirect, 5.0.1 → 6.2.2) · Repo
Security Advisories 🚨
🚨 Inefficient Regular Expression Complexity in chalk/ansi-regex
ansi-regex is vulnerable to Inefficient Regular Expression Complexity which could lead to a denial of service when parsing invalid ANSI escape codes.
Proof of Concept
import ansiRegex from 'ansi-regex'; for(var i = 1; i <= 50000; i++) { var time = Date.now(); var attack_str = "\u001B["+";".repeat(i*10000); ansiRegex().test(attack_str) var time_cost = Date.now() - time; console.log("attack_str.length: " + attack_str.length + ": " + time_cost+" ms") }The ReDOS is mainly due to the sub-patterns
[[\\]()#;?]*and(?:;[-a-zA-Z\\d\\/#&.:=?%@~_]*)*
Release Notes
6.2.2
- Fix vulnerability in 6.2.1, see: chalk/chalk#656
6.2.0
6.1.0
6.0.1
Fixes
- Fix ReDoS in certain cases (#37)
You are only really affected if you run the regex on untrusted user input in a server context, which it's very unlikely anyone is doing, since this regex is mainly used in command-line tools.Thank you @yetingli for the patch and reproduction case!
6.0.0
Breaking
Does any of this look wrong? Please let us know.
Commits
See the full diff on Github. The new version differs by 63 commits:
6.2.26.2.0Add test for #57Simplify regexSupport colon separated parameters to control sequences (#62)Readme update6.1.0Fix: Handle all valid ST characters (#58)Meta tweaksMatch cursorSave and cursorRestore escape codes (#45)fix incorrect format6.0.1Fix potential ReDoS (#37)6.0.0Require Node.js 12 and move to ESMMove to GitHub Actions (#35)Add @Qix- to funding.yml5.0.0Meta tweaksAdd TypeScript definition (#32)Require Node.js 8Tidelift tasks4.1.0Support more escape types like links (#29)Add Tidelift mention in the readme4.0.0Require Node.js 6Add option to only match the first occurrence (#24)Add scroll escapes (#20)Add failing test for #21 (#22)3.0.0Minor tweaksSupport urxvt escapes (#13)Use Map instead of Object for the fixturesRequire Node.js 4 and meta tweaks2.1.1Support `[P` escape (delete character) (#10)Use last XO & AVA versions that supports Node.js 0.10 and 0.12 (#11)Use AVA instead of mocha (#7)added question regarding non-standard codesadd XOadded Qix as maintainerupdate references to new org2.0.0tweaksMerge pull request #4 from Qix-/better-regeximproved ANSI pattern to match more codesadded complete code and overconsumption tests1.1.1Updates maintainer info.Update .travis.yml1.1.0code stylemake the regex groups non-capturingClose GH-2: Updated the regex to match ANSI spec..1.0.0tweaks0.2.1don't need capturing groups0.2.0make it a function and add explanation of why0.1.0init
↗️ babel-plugin-istanbul (indirect, 6.1.1 → 7.0.1) · Repo · Changelog
Release Notes
7.0.1
Bug Fixes
7.0.0
⚠ BREAKING CHANGES
- Drop support for Node versions 8 and 10
Bug Fixes
Does any of this look wrong? Please let us know.
Commits
See the full diff on Github. The new version differs by 7 commits:
chore: release 7.0.1 (#305)Use `prepublishOnly` instead of `prepublish` for npm scripts (#306)fix: Add support for Babel 8 (#304)chore: release 7.0.0 (#297)docs: readme: fixed example: `fileName` -> `filename` (#269)fix!: update `istanbul-lib-instrument` to v6 (#292)fix: container is falsy error with block scoping transform (#291)
↗️ babel-plugin-jest-hoist (indirect, 29.6.3 → 30.2.0) · Repo · Changelog
Release Notes
30.2.0
Chore & Maintenance
[*]Update example repo for testing React Native projects (#15832)[*]Updatejest-watch-typeaheadto v3 (#15830)Features
[jest-environment-jsdom-abstract]Add support for JSDOM v27 (#15834)Fixes
30.0.1
What's Changed
Features
[jest-resolver]Implement thedefaultAsyncResolver(#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 deprecatejest-replpackage (#15673)[jest-resolver]Replace customisBuiltinModulewith node'sisBuiltin(#15685)New Contributors
Full Changelog: https://github.com/jestjs/jest/blob/main/CHANGELOG.md
30.0.0
Today we are happy to announce the release of Jest 30. This release features a substantial number of changes, fixes, and improvements. While it is one of the largest major releases of Jest ever, we admit that three years for a major release is too long. In the future, we are aiming to make more frequent major releases to keep Jest great for the next decade.
If you want to skip all the news and just get going, run
npm install jest@^30.0.0and follow the migration guide: Upgrading from Jest 29 to 30.Features
[*]RenamedglobalsCleanupModetoglobalsCleanupand--waitNextEventLoopTurnForUnhandledRejectionEventsto--waitForUnhandledRejections[expect]AddArrayOfasymmetric matcher for validating array elements. (#15567)[babel-jest]Add optionexcludeJestPresetto allow opting out ofbabel-preset-jest(#15164)[expect]Revert #15038 to fixexpect(fn).toHaveBeenCalledWith(expect.objectContaining(...))when there are multiple calls (#15508)[jest-circus, jest-cli, jest-config]AddwaitNextEventLoopTurnForUnhandledRejectionEventsflag to minimise performance impact of correct detection of unhandled promise rejections introduced in #14315 (#14681)[jest-circus]Add awaitBeforeRetryoption tojest.retryTimes(#14738)[jest-circus]Add aretryImmediatelyoption tojest.retryTimes(#14696)[jest-circus, jest-jasmine2]AllowsetupFilesAfterEnvto export an async function (#10962)[jest-circus, jest-test-result]AddstartedAttimestamp inTestCaseResultObjectwithinonTestCaseResult(#15145)[jest-cli]ExportbuildArgv(#15310)[jest-config][BREAKING] Addmtsandctsto defaultmoduleFileExtensionsconfig (#14369)[jest-config][BREAKING] UpdatetestMatchandtestRegexdefault option for supportingmjs,cjs,mts, andcts(#14584)[jest-config]Loads config file from provided path inpackage.json(#14044)[jest-config]Allow loadingjest.config.ctsfiles (#14070)[jest-config]ShowrootDirin error message when apresetfails to load (#15194)[jest-config]Support loading TS config files usingesbuild-registervia 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]AddperfStatsto surface test setup overhead (#14622)[@jest/core][BREAKING] Changed--filterto accept an object with shape{ filtered: Array<string> }to match documentation (#13319)[@jest/core]Support--outputFileoption for--listTests(#14980)[@jest/core]Stringify Errors properly with--jsonflag (#15329)[@jest/core, @jest/test-sequencer][BREAKING] ExposesglobalConfig&contextstoTestSequencer(#14535, & #14543)[jest-each]Introduce%$option to add number of the test to its title (#14710)[@jest/environment][BREAKING] Remove deprecatedjest.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 thejsdomenvironment, allowing usage of custom versions of JSDOM (#14717)[jest-environment-node]Update jest environment with dispose symbolsSymbol(#14888 & #14909)[expect, @jest/expect][BREAKING] Add type inference for function parameters inCalledWithassertions (#15129)[@jest/expect-utils]Properly compare all types ofTypedArrays (#15178)[@jest/fake-timers][BREAKING] Upgrade@sinonjs/fake-timersto v13 (#14544 & #15470)[@jest/fake-timers]Exposing new modern timers functionadvanceTimersToFrame()which advances all timers by the needed milliseconds to execute callbacks currently scheduled withrequestAnimationFrame(#14598)[jest-matcher-utils]AddSERIALIZABLE_PROPERTIESto allow custom serialization of objects (#14893)[jest-mock]Add support for the Explicit Resource Management proposal to use theusingkeyword withjest.spyOn(object, methodName)(#14895)[jest-reporters]Add support for DEC mode 2026 (#15008)[jest-resolver]Supportfile://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 functionjest.advanceTimersToFrame()from@jest/fake-timers(#14598)[jest-runtime]Supportimport.meta.filenameandimport.meta.dirname(available from Node 20.11) (#14854)[jest-runtime]Supportimport.meta.resolve(#14930)[jest-runtime][BREAKING] Make it mandatory to passglobalConfigto theRuntimeconstructor (#15044)[jest-runtime]Addunstable_unmockModule(#15080)[jest-runtime]AddonGenerateMocktransformer callback for auto generated callbacks (#15433 & #15482)[jest-runtime][BREAKING] Usevm.compileFunctionovervm.Script(#15461)[@jest/schemas]Upgrade@sinclair/typeboxto v0.34 (#15450)[@jest/types]test.each(): Accept a readonly (as const) table properly (#14565)[@jest/types]Improve argument type inference passed totestanddescribecallback functions fromeachtables (#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 fromjest-snapshotinto its own package (#15095)[pretty-format][BREAKING] Do not render empty string children ('') in React plugin (#14470)Fixes
[expect]ShowAggregateErrorto display (#15346)[*]Replaceexitwithexit-x(#15399)[babel-plugin-jest-hoist]Usedenylistinstead of the deprecatedblacklistfor Babel 8 support (#14109)[babel-plugin-jest-hoist]Do not rely on buggy Babel behaviour (#15415)[expect]Check error instance type fortoThrow/toThrowError(#14576)[expect]Improve diff for failingexpect.objectContaining(#15038)[expect]UseArray.isArrayto check if an array is anArray(#15101)[expect]Fix Errorcauseassertion errors (#15339)[jest-changed-files]Print underlying errors when VCS commands fail (#15052)[jest-changed-files]Abortsl rootcall if output resembles a steam locomotive (#15053)[jest-circus][BREAKING] Prevent false test failures caused by promise rejections handled asynchronously (#14315)[jest-circus]Replace recursivemakeTestResultsimplementation with iterative one (#14760)[jest-circus]Omitexpect.hasAssertions()errors if a test already has errors (#14866)[jest-circus, jest-expect, jest-snapshot]Passtest.failingtests 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 respectrunInBandoption (#14578)[jest-config]SupporttestTimeoutin project config (#14697)[jest-config]SupportcoverageReportersin project config (#14697)[jest-config]Allowreportersin project config (#14768)[jest-config]Allow Node16/NodeNext/BundlermoduleResolutionin project's tsconfig (#14739)[@jest/create-cache-key-function]Correct the return type ofcreateCacheKey(#15159)[jest-each]Allow$keypathtemplates withnullorundefinedvalues (#14831)[@jest/expect-utils]Fix comparison ofDataView(#14408)[@jest/expect-utils][BREAKING] exclude non-enumerable in object matching (#14670)[@jest/expect-utils]Fix comparison ofURL(#14672)[@jest/expect-utils]CheckSymbolproperties 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 multiplehasteImplModulePaths (#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_importCoreModelso required core module is consistent if modified while loading (#15077)[jest-schemas, jest-types][BREAKING] Fix type oftestFailureExitCodeconfig option(#15232)[jest-util]Make sureisInteractiveworks in a browser (#14552)[pretty-format][BREAKING] PrintArrayBufferandDataViewcorrectly (#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
testPathPatternconfiguration option totestPathPatterns, which now takes a list of patterns instead of the regex.- [BREAKING]
--testPathPatternis now--testPathPatterns- [BREAKING] Specifying
testPathPatternswhen programmatically callingwatchmust be specified asnew TestPathPatterns(patterns), whereTestPathPatternscan be imported from@jest/pattern[jest-reporters, jest-runner]Unhandled errors without stack get correctly logged to console (#14619)[jest-util]Always loadmjsfiles withimport(#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 whereObjectContainingmatched non-object values. ([#15463])(#15463).
- Adds a
conditional/checkto ensure the argument passed toexpectis an object.- Add unit tests for new
ObjectContainingbehavior.- Remove
invalid/wrongtest case assertions forObjectContaining.[jest-worker]Addresses incorrect state on exit (#15610)Performance
[*][BREAKING] Bundle all of Jest's modules intoindex.js(#12348, #14550 & #14661)[jest-haste-map]Only spawn one process to check forwatchmaninstallation (#14826)[jest-runner]Better cleanupsource-map-supportafter test to resolve (minor) memory leak (#15233)[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(#15325CVE-2024-37890)[*]Increase version ofmicromatchto^4.0.7(#15082)[*][BREAKING] Drop support for Node.js versions 14, 16, 19, 21 and 23 (#14460, #15118, #15623, #15640)[*][BREAKING] Drop support fortypescript@4.3, minimum version is now5.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 toglob@10(#14509)[*]UseTypeErroroverErrorwhere appropriate (#14799)[docs]Fix typos inCHANGELOG.mdandpackages/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/coreto^7.11(#14109)[babel-jest, @jest/transform]Updatebabel-plugin-istanbulto v6 (#15156)[babel-plugin-jest-hoist]Move unnecessarydependenciestodevDependencies(#15010)[expect][BREAKING] Remove.toBeCalled(),.toBeCalledTimes(),.toBeCalledWith(),.lastCalledWith(),.nthCalledWith(),.toReturn(),.toReturnTimes(),.toReturnWith(),.lastReturnedWith(),.nthReturnedWith()and.toThrowError()matcher aliases (#14632)[jest-cli, jest-config, @jest/types][BREAKING] Remove deprecated--initargument (#14490)[jest-config, @jest/core, jest-util]Upgradeci-info(#14655)[jest-mock][BREAKING] RemoveMockFunctionMetadataType,MockFunctionMetadataandSpyInstancetypes (#14621)[@jest/reporters]Upgradeistanbul-lib-source-maps(#14924)[jest-schemas]Upgrade@sinclair/typebox(#14775)[jest-transform]Upgradewrite-file-atomic(#14274)[jest-util]Upgradepicomatchto v4 (#14653 & #14885)[docs] Append to NODE_OPTIONS, not overwrite ([#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)See the CHANGELOG.
Does any of this look wrong? Please let us know.
Commits
See the full diff on Github. The new version differs by more commits than we can show here.
↗️ babel-preset-current-node-syntax (indirect, 1.1.0 → 1.2.0) · Repo
Commits
See the full diff on Github. The new version differs by 6 commits:
↗️ babel-preset-jest (indirect, 29.6.3 → 30.2.0) · Repo · Changelog
Release Notes
30.2.0
Chore & Maintenance
[*]Update example repo for testing React Native projects (#15832)[*]Updatejest-watch-typeaheadto v3 (#15830)Features
[jest-environment-jsdom-abstract]Add support for JSDOM v27 (#15834)Fixes
30.0.1
What's Changed
Features
[jest-resolver]Implement thedefaultAsyncResolver(#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 deprecatejest-replpackage (#15673)[jest-resolver]Replace customisBuiltinModulewith node'sisBuiltin(#15685)New Contributors
Full Changelog: https://github.com/jestjs/jest/blob/main/CHANGELOG.md
30.0.0
Today we are happy to announce the release of Jest 30. This release features a substantial number of changes, fixes, and improvements. While it is one of the largest major releases of Jest ever, we admit that three years for a major release is too long. In the future, we are aiming to make more frequent major releases to keep Jest great for the next decade.
If you want to skip all the news and just get going, run
npm install jest@^30.0.0and follow the migration guide: Upgrading from Jest 29 to 30.Features
[*]RenamedglobalsCleanupModetoglobalsCleanupand--waitNextEventLoopTurnForUnhandledRejectionEventsto--waitForUnhandledRejections[expect]AddArrayOfasymmetric matcher for validating array elements. (#15567)[babel-jest]Add optionexcludeJestPresetto allow opting out ofbabel-preset-jest(#15164)[expect]Revert #15038 to fixexpect(fn).toHaveBeenCalledWith(expect.objectContaining(...))when there are multiple calls (#15508)[jest-circus, jest-cli, jest-config]AddwaitNextEventLoopTurnForUnhandledRejectionEventsflag to minimise performance impact of correct detection of unhandled promise rejections introduced in #14315 (#14681)[jest-circus]Add awaitBeforeRetryoption tojest.retryTimes(#14738)[jest-circus]Add aretryImmediatelyoption tojest.retryTimes(#14696)[jest-circus, jest-jasmine2]AllowsetupFilesAfterEnvto export an async function (#10962)[jest-circus, jest-test-result]AddstartedAttimestamp inTestCaseResultObjectwithinonTestCaseResult(#15145)[jest-cli]ExportbuildArgv(#15310)[jest-config][BREAKING] Addmtsandctsto defaultmoduleFileExtensionsconfig (#14369)[jest-config][BREAKING] UpdatetestMatchandtestRegexdefault option for supportingmjs,cjs,mts, andcts(#14584)[jest-config]Loads config file from provided path inpackage.json(#14044)[jest-config]Allow loadingjest.config.ctsfiles (#14070)[jest-config]ShowrootDirin error message when apresetfails to load (#15194)[jest-config]Support loading TS config files usingesbuild-registervia 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]AddperfStatsto surface test setup overhead (#14622)[@jest/core][BREAKING] Changed--filterto accept an object with shape{ filtered: Array<string> }to match documentation (#13319)[@jest/core]Support--outputFileoption for--listTests(#14980)[@jest/core]Stringify Errors properly with--jsonflag (#15329)[@jest/core, @jest/test-sequencer][BREAKING] ExposesglobalConfig&contextstoTestSequencer(#14535, & #14543)[jest-each]Introduce%$option to add number of the test to its title (#14710)[@jest/environment][BREAKING] Remove deprecatedjest.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 thejsdomenvironment, allowing usage of custom versions of JSDOM (#14717)[jest-environment-node]Update jest environment with dispose symbolsSymbol(#14888 & #14909)[expect, @jest/expect][BREAKING] Add type inference for function parameters inCalledWithassertions (#15129)[@jest/expect-utils]Properly compare all types ofTypedArrays (#15178)[@jest/fake-timers][BREAKING] Upgrade@sinonjs/fake-timersto v13 (#14544 & #15470)[@jest/fake-timers]Exposing new modern timers functionadvanceTimersToFrame()which advances all timers by the needed milliseconds to execute callbacks currently scheduled withrequestAnimationFrame(#14598)[jest-matcher-utils]AddSERIALIZABLE_PROPERTIESto allow custom serialization of objects (#14893)[jest-mock]Add support for the Explicit Resource Management proposal to use theusingkeyword withjest.spyOn(object, methodName)(#14895)[jest-reporters]Add support for DEC mode 2026 (#15008)[jest-resolver]Supportfile://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 functionjest.advanceTimersToFrame()from@jest/fake-timers(#14598)[jest-runtime]Supportimport.meta.filenameandimport.meta.dirname(available from Node 20.11) (#14854)[jest-runtime]Supportimport.meta.resolve(#14930)[jest-runtime][BREAKING] Make it mandatory to passglobalConfigto theRuntimeconstructor (#15044)[jest-runtime]Addunstable_unmockModule(#15080)[jest-runtime]AddonGenerateMocktransformer callback for auto generated callbacks (#15433 & #15482)[jest-runtime][BREAKING] Usevm.compileFunctionovervm.Script(#15461)[@jest/schemas]Upgrade@sinclair/typeboxto v0.34 (#15450)[@jest/types]test.each(): Accept a readonly (as const) table properly (#14565)[@jest/types]Improve argument type inference passed totestanddescribecallback functions fromeachtables (#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 fromjest-snapshotinto its own package (#15095)[pretty-format][BREAKING] Do not render empty string children ('') in React plugin (#14470)Fixes
[expect]ShowAggregateErrorto display (#15346)[*]Replaceexitwithexit-x(#15399)[babel-plugin-jest-hoist]Usedenylistinstead of the deprecatedblacklistfor Babel 8 support (#14109)[babel-plugin-jest-hoist]Do not rely on buggy Babel behaviour (#15415)[expect]Check error instance type fortoThrow/toThrowError(#14576)[expect]Improve diff for failingexpect.objectContaining(#15038)[expect]UseArray.isArrayto check if an array is anArray(#15101)[expect]Fix Errorcauseassertion errors (#15339)[jest-changed-files]Print underlying errors when VCS commands fail (#15052)[jest-changed-files]Abortsl rootcall if output resembles a steam locomotive (#15053)[jest-circus][BREAKING] Prevent false test failures caused by promise rejections handled asynchronously (#14315)[jest-circus]Replace recursivemakeTestResultsimplementation with iterative one (#14760)[jest-circus]Omitexpect.hasAssertions()errors if a test already has errors (#14866)[jest-circus, jest-expect, jest-snapshot]Passtest.failingtests 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 respectrunInBandoption (#14578)[jest-config]SupporttestTimeoutin project config (#14697)[jest-config]SupportcoverageReportersin project config (#14697)[jest-config]Allowreportersin project config (#14768)[jest-config]Allow Node16/NodeNext/BundlermoduleResolutionin project's tsconfig (#14739)[@jest/create-cache-key-function]Correct the return type ofcreateCacheKey(#15159)[jest-each]Allow$keypathtemplates withnullorundefinedvalues (#14831)[@jest/expect-utils]Fix comparison ofDataView(#14408)[@jest/expect-utils][BREAKING] exclude non-enumerable in object matching (#14670)[@jest/expect-utils]Fix comparison ofURL(#14672)[@jest/expect-utils]CheckSymbolproperties 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 multiplehasteImplModulePaths (#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_importCoreModelso required core module is consistent if modified while loading (#15077)[jest-schemas, jest-types][BREAKING] Fix type oftestFailureExitCodeconfig option(#15232)[jest-util]Make sureisInteractiveworks in a browser (#14552)[pretty-format][BREAKING] PrintArrayBufferandDataViewcorrectly (#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
testPathPatternconfiguration option totestPathPatterns, which now takes a list of patterns instead of the regex.- [BREAKING]
--testPathPatternis now--testPathPatterns- [BREAKING] Specifying
testPathPatternswhen programmatically callingwatchmust be specified asnew TestPathPatterns(patterns), whereTestPathPatternscan be imported from@jest/pattern[jest-reporters, jest-runner]Unhandled errors without stack get correctly logged to console (#14619)[jest-util]Always loadmjsfiles withimport(#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 whereObjectContainingmatched non-object values. ([#15463])(#15463).
- Adds a
conditional/checkto ensure the argument passed toexpectis an object.- Add unit tests for new
ObjectContainingbehavior.- Remove
invalid/wrongtest case assertions forObjectContaining.[jest-worker]Addresses incorrect state on exit (#15610)Performance
[*][BREAKING] Bundle all of Jest's modules intoindex.js(#12348, #14550 & #14661)[jest-haste-map]Only spawn one process to check forwatchmaninstallation (#14826)[jest-runner]Better cleanupsource-map-supportafter test to resolve (minor) memory leak (#15233)[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(#15325CVE-2024-37890)[*]Increase version ofmicromatchto^4.0.7(#15082)[*][BREAKING] Drop support for Node.js versions 14, 16, 19, 21 and 23 (#14460, #15118, #15623, #15640)[*][BREAKING] Drop support fortypescript@4.3, minimum version is now5.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 toglob@10(#14509)[*]UseTypeErroroverErrorwhere appropriate (#14799)[docs]Fix typos inCHANGELOG.mdandpackages/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/coreto^7.11(#14109)[babel-jest, @jest/transform]Updatebabel-plugin-istanbulto v6 (#15156)[babel-plugin-jest-hoist]Move unnecessarydependenciestodevDependencies(#15010)[expect][BREAKING] Remove.toBeCalled(),.toBeCalledTimes(),.toBeCalledWith(),.lastCalledWith(),.nthCalledWith(),.toReturn(),.toReturnTimes(),.toReturnWith(),.lastReturnedWith(),.nthReturnedWith()and.toThrowError()matcher aliases (#14632)[jest-cli, jest-config, @jest/types][BREAKING] Remove deprecated--initargument (#14490)[jest-config, @jest/core, jest-util]Upgradeci-info(#14655)[jest-mock][BREAKING] RemoveMockFunctionMetadataType,MockFunctionMetadataandSpyInstancetypes (#14621)[@jest/reporters]Upgradeistanbul-lib-source-maps(#14924)[jest-schemas]Upgrade@sinclair/typebox(#14775)[jest-transform]Upgradewrite-file-atomic(#14274)[jest-util]Upgradepicomatchto v4 (#14653 & #14885)[docs] Append to NODE_OPTIONS, not overwrite ([#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)See the CHANGELOG.
Does any of this look wrong? Please let us know.
Commits
See the full diff on Github. The new version differs by more commits than we can show here.
↗️ ci-info (indirect, 3.9.0 → 4.3.1) · Repo · Changelog
Release Notes
4.3.1
Bug Fixes
- don't read envs when CI is set to false 3fae1ac
4.3.0
- support Cloudflare workers e438266
4.2.0
What's Changed
- feat: add support for Cloudflare Pages CI by @AleksandrHovhannisyan in #134
New Contributors
- @AleksandrHovhannisyan made their first contribution in #134
Full Changelog: v4.1.0...v4.2.0
4.1.0
What's Changed
- support Appcircle PR 1d42c26
- support AWS CodeBuild PR e6fcdd2
- add
ci.idto return vendor constant 81fd993- Update README.md by @soursize in #131
New Contributors
Full Changelog: v4.0.0...v4.1.0
4.0.0
- support Earthly CI fb8bd85
- support Prow CI 8e6a591
- support Vela CI bb13901
- support Agola CI ec4e149
- support Gitea Actions f6f173f
- run tests on nodejs v20 bff314d
Breaking Changes
Does any of this look wrong? Please let us know.
Commits
See the full diff on Github. The new version differs by 40 commits:
chore: commit lockfileci: fix publish scriptrelease: v4.3.1ci: bump actionsci: add npm publish actionfix: don't read envs when explicitly not in CI (#140)release: v4.3.0chore: bump dependenciesfeat: add cloudlfare workers (#138)Cleanup hooksrelease: v4.2.0chore: bump devDependenciesfeat: add support for Cloudflare Pageschore: fix publint warningsrelease: v4.1.0chore: not fail in cifix: handle appcircle false valuechore: fix testsci: skip husky installationchore: update AppCirlce PR support (#131)chore: update READMEfeat: add AppCircle PR supportchore: cleanup testsfeat: add vendor idchore: do cleanupfeat: add support for AWS codebuild PRchore: bump dependencieschore: add contributors fieldsrelease: v4.0.0style: fix formattingfeat: add Eartly CIfeat: add Prow CIchore: remove solano CIfeat: add Vela CIchore: update READMEfeat: add agola CIfeat: support Gitea Actionschore: format vendors.jsonchore: remove Shippable CIci: support node 20
↗️ cjs-module-lexer (indirect, 1.3.1 → 2.1.0) · Repo · Changelog
Release Notes
2.1.0
What's Changed
- Add instructions for creating a release to the readme. by @mhdawson in #109
- fix: restore configuration through env variables by @mhdawson in #111
Full Changelog: 2.0.0...2.1.0
2.0.0
What's Changed
- chore: move to using ubuntu 22 for actions by @mhdawson in #106
- feat: build wasm in common wasm-builder by @mhdawson in #105
New Contributors
Full Changelog: 1.4.1...2.0.0
1.4.2
What's Changed
- chore: move to using ubuntu 22 for actions by @mhdawson in #106
- feat: build wasm in common wasm-builder by @mhdawson in #105
New Contributors
Full Changelog: 1.4.1...1.4.2
Does any of this look wrong? Please let us know.
Commits
See the full diff on Github. The new version differs by 19 commits:
2.1.0Merge pull request #111 from mhdawson/fixup-config-optionsfix: restore configuration through env variablesMerge pull request #109 from nodejs/mhdawson-patch-1Update README.md2.0.0Update README.mdUpdate README.mdAdd instructions for creating a release to the readme.1.4.2feat: build wasm in common wasm-builder (#105)chore: move to using ubuntu 22 for actions (#106)1.4.1rework browser handling for buffer decoding (#104)Fix environment detection in web worker (#103)1.4.0feat: add initSync() to initialize WASM synchronously (#100)Revert build changes (#95)tests: fix loading wasm when targeting external deps (#94)
↗️ collect-v8-coverage (indirect, 1.0.2 → 1.0.3) · Repo · Changelog
Commits
See the full diff on Github. The new version differs by more commits than we can show here.
↗️ dedent (indirect, 1.5.3 → 1.7.0) · Repo · Changelog
Release Notes
1.7.0
What's Changed
- docs: cleaned up README.md badges by @JoshuaKGoldberg in #100
- feat: add alignValues option by @PaperStrike in #102
- 1.7.0 by @JoshuaKGoldberg in #103
New Contributors
- @PaperStrike made their first contribution in #102
Full Changelog: v1.6.0...v1.7.0
1.6.0
What's Changed
New Contributors
Full Changelog: v1.5.3...v1.6.0
Does any of this look wrong? Please let us know.
Commits
See the full diff on Github. The new version differs by 5 commits:
↗️ emoji-regex (indirect, 8.0.0 → 9.2.2) · Repo
Commits
See the full diff on Github. The new version differs by 24 commits:
Release v9.2.2Add *.d.ts to .editorconfigFix type definitionsStop outputting the pattern as a text fileRemove redundant commandUpdate branch name in Travis CI badgeUpdate branch nameRelease v9.2.1Add support for Emoji 13.1 sequences (#84)Produce a text file containing only the generated pattern (#82)Release v9.2.0Add RGI_Emoji output (#75)Update maintainer instructionsRelease v9.1.1Limit NPM_TOKEN dependency to `publish` command (#74)Release v9.1.0Automate `npm publish` for new tags (#73)Document how to update emoji-regex after Unicode Standard releases (#72)Provide correct export types for CJS module (#63)Future-proof build script + tests (#71)Test on Node.js v12Release v9.0.0Update to Unicode v13.0.0Update dependencies
↗️ error-ex (indirect, 1.3.2 → 1.3.4) · Repo
Security Advisories 🚨
🚨 error-ex@1.3.3 contains malware after npm account takeover
Impact
On 8 September 2025, an npm publishing account for
error-exwas taken over after a phishing attack. Version1.3.3was published, functionally identical to the previous patch version, but with a malware payload added attempting to redirect cryptocurrency transactions to the attacker's own addresses from within browser environments.Local environments, server environments, command line applications, etc. are not affected. If the package was used in a browser context (e.g. a direct
<script>inclusion, or via a bundling tool such as Babel, Rollup, Vite, Next.js, etc.) there is a chance the malware still exists and such bundles will need to be rebuilt.The malware seemingly only targets cryptocurrency transactions and wallets such as MetaMask. See references below for more information on the payload.
Patches
npm removed the offending package from the registry over the course of the day on 8 September, preventing further downloads from npm proper.
On 13 September, the package owner published new patch versions to help cache-bust those using private registries who might still have the compromised version cached. This version is functionally identical to the previously known-good version, published as a patch version bump above the compromised version.
Users should update to the latest patch version, completely remove their
node_modulesdirectory, clean their package manager's global cache, and rebuild any browser bundles from scratch.Those operating private registries or registry mirrors should purge the offending versions from any caches.
References
- https://www.aikido.dev/blog/npm-debug-and-chalk-packages-compromised
- https://socket.dev/blog/npm-author-qix-compromised-in-major-supply-chain-attack
- https://www.ox.security/blog/npm-packages-compromised/
Point of Contact
In the event suspicious behavior is still observed for the package listed in this security advisory after performing all of the above cleaning operations (see Patches above), please reach out via one of the following channels of communication:
- Bluesky, compromised publishing account owner: https://bsky.app/profile/bad-at-computer.bsky.social
debugrepository, tracking issue (applies to all packages affected in the breach): debug-js/debug#1005
Release Notes
1.3.4
Functionally identical release to
1.3.2.Version
1.3.3is compromised. Please see debug-js/debug#1005.
Does any of this look wrong? Please let us know.
Commits
See the full diff on Github. The new version differs by 3 commits:
↗️ expect (indirect, 29.7.0 → 30.2.0) · Repo · Changelog
Release Notes
30.2.0
Chore & Maintenance
[*]Update example repo for testing React Native projects (#15832)[*]Updatejest-watch-typeaheadto v3 (#15830)Features
[jest-environment-jsdom-abstract]Add support for JSDOM v27 (#15834)Fixes
30.1.1
Fixes
[jest-snapshot-utils]Fix deprecated goo.gl snapshot warning not handling Windows end-of-line sequences (#15800)
30.1.0
Features
[jest-leak-detector]Configurable GC aggressiveness regarding to V8 heap snapshot generation (#15793)[jest-runtime]Reduce redundant ReferenceError messages[jest-core]Include test modules that failed to load when --onlyFailures is activeFixes
- `[jest-snapshot-utils] Fix deprecated goo.gl snapshot guide link not getting replaced with fully canonical URL (#15787)
[jest-circus]Fixit.concurrentnot working withdescribe.skip(#15765)[jest-snapshot]Fix mangled inline snapshot updates when used with Prettier 3 and CRLF line endings[jest-runtime]Importing from@jest/globalsin more than one file no longer breaks relative paths (#15772)Chore
[expect]Update docblock fortoContain()to display info on substring check (#15789)
30.0.5 (from changelog)
Features
[jest-config]AllowtestMatchto take a string value[jest-worker]LetworkerIdleMemoryLimitaccept 0 to always restart worker child processesFixes
[expect]Fixbiginterror (#15702)
30.0.4 (from changelog)
Features
[expect]TheInversetype is now exported (#15714)[expect]feat: supportasync functionsintoBe(#15704)Fixes
30.0.3 (from changelog)
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)
30.0.2
What's Changed
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)Full Changelog: https://github.com/jestjs/jest/blob/main/CHANGELOG.md
30.0.1
What's Changed
Features
[jest-resolver]Implement thedefaultAsyncResolver(#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 deprecatejest-replpackage (#15673)[jest-resolver]Replace customisBuiltinModulewith node'sisBuiltin(#15685)New Contributors
Full Changelog: https://github.com/jestjs/jest/blob/main/CHANGELOG.md
30.0.0
Today we are happy to announce the release of Jest 30. This release features a substantial number of changes, fixes, and improvements. While it is one of the largest major releases of Jest ever, we admit that three years for a major release is too long. In the future, we are aiming to make more frequent major releases to keep Jest great for the next decade.
If you want to skip all the news and just get going, run
npm install jest@^30.0.0and follow the migration guide: Upgrading from Jest 29 to 30.Features
[*]RenamedglobalsCleanupModetoglobalsCleanupand--waitNextEventLoopTurnForUnhandledRejectionEventsto--waitForUnhandledRejections[expect]AddArrayOfasymmetric matcher for validating array elements. (#15567)[babel-jest]Add optionexcludeJestPresetto allow opting out ofbabel-preset-jest(#15164)[expect]Revert #15038 to fixexpect(fn).toHaveBeenCalledWith(expect.objectContaining(...))when there are multiple calls (#15508)[jest-circus, jest-cli, jest-config]AddwaitNextEventLoopTurnForUnhandledRejectionEventsflag to minimise performance impact of correct detection of unhandled promise rejections introduced in #14315 (#14681)[jest-circus]Add awaitBeforeRetryoption tojest.retryTimes(#14738)[jest-circus]Add aretryImmediatelyoption tojest.retryTimes(#14696)[jest-circus, jest-jasmine2]AllowsetupFilesAfterEnvto export an async function (#10962)[jest-circus, jest-test-result]AddstartedAttimestamp inTestCaseResultObjectwithinonTestCaseResult(#15145)[jest-cli]ExportbuildArgv(#15310)[jest-config][BREAKING] Addmtsandctsto defaultmoduleFileExtensionsconfig (#14369)[jest-config][BREAKING] UpdatetestMatchandtestRegexdefault option for supportingmjs,cjs,mts, andcts(#14584)[jest-config]Loads config file from provided path inpackage.json(#14044)[jest-config]Allow loadingjest.config.ctsfiles (#14070)[jest-config]ShowrootDirin error message when apresetfails to load (#15194)[jest-config]Support loading TS config files usingesbuild-registervia 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]AddperfStatsto surface test setup overhead (#14622)[@jest/core][BREAKING] Changed--filterto accept an object with shape{ filtered: Array<string> }to match documentation (#13319)[@jest/core]Support--outputFileoption for--listTests(#14980)[@jest/core]Stringify Errors properly with--jsonflag (#15329)[@jest/core, @jest/test-sequencer][BREAKING] ExposesglobalConfig&contextstoTestSequencer(#14535, & #14543)[jest-each]Introduce%$option to add number of the test to its title (#14710)[@jest/environment][BREAKING] Remove deprecatedjest.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 thejsdomenvironment, allowing usage of custom versions of JSDOM (#14717)[jest-environment-node]Update jest environment with dispose symbolsSymbol(#14888 & #14909)[expect, @jest/expect][BREAKING] Add type inference for function parameters inCalledWithassertions (#15129)[@jest/expect-utils]Properly compare all types ofTypedArrays (#15178)[@jest/fake-timers][BREAKING] Upgrade@sinonjs/fake-timersto v13 (#14544 & #15470)[@jest/fake-timers]Exposing new modern timers functionadvanceTimersToFrame()which advances all timers by the needed milliseconds to execute callbacks currently scheduled withrequestAnimationFrame(#14598)[jest-matcher-utils]AddSERIALIZABLE_PROPERTIESto allow custom serialization of objects (#14893)[jest-mock]Add support for the Explicit Resource Management proposal to use theusingkeyword withjest.spyOn(object, methodName)(#14895)[jest-reporters]Add support for DEC mode 2026 (#15008)[jest-resolver]Supportfile://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 functionjest.advanceTimersToFrame()from@jest/fake-timers(#14598)[jest-runtime]Supportimport.meta.filenameandimport.meta.dirname(available from Node 20.11) (#14854)[jest-runtime]Supportimport.meta.resolve(#14930)[jest-runtime][BREAKING] Make it mandatory to passglobalConfigto theRuntimeconstructor (#15044)[jest-runtime]Addunstable_unmockModule(#15080)[jest-runtime]AddonGenerateMocktransformer callback for auto generated callbacks (#15433 & #15482)[jest-runtime][BREAKING] Usevm.compileFunctionovervm.Script(#15461)[@jest/schemas]Upgrade@sinclair/typeboxto v0.34 (#15450)[@jest/types]test.each(): Accept a readonly (as const) table properly (#14565)[@jest/types]Improve argument type inference passed totestanddescribecallback functions fromeachtables (#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 fromjest-snapshotinto its own package (#15095)[pretty-format][BREAKING] Do not render empty string children ('') in React plugin (#14470)Fixes
[expect]ShowAggregateErrorto display (#15346)[*]Replaceexitwithexit-x(#15399)[babel-plugin-jest-hoist]Usedenylistinstead of the deprecatedblacklistfor Babel 8 support (#14109)[babel-plugin-jest-hoist]Do not rely on buggy Babel behaviour (#15415)[expect]Check error instance type fortoThrow/toThrowError(#14576)[expect]Improve diff for failingexpect.objectContaining(#15038)[expect]UseArray.isArrayto check if an array is anArray(#15101)[expect]Fix Errorcauseassertion errors (#15339)[jest-changed-files]Print underlying errors when VCS commands fail (#15052)[jest-changed-files]Abortsl rootcall if output resembles a steam locomotive (#15053)[jest-circus][BREAKING] Prevent false test failures caused by promise rejections handled asynchronously (#14315)[jest-circus]Replace recursivemakeTestResultsimplementation with iterative one (#14760)[jest-circus]Omitexpect.hasAssertions()errors if a test already has errors (#14866)[jest-circus, jest-expect, jest-snapshot]Passtest.failingtests 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 respectrunInBandoption (#14578)[jest-config]SupporttestTimeoutin project config (#14697)[jest-config]SupportcoverageReportersin project config (#14697)[jest-config]Allowreportersin project config (#14768)[jest-config]Allow Node16/NodeNext/BundlermoduleResolutionin project's tsconfig (#14739)[@jest/create-cache-key-function]Correct the return type ofcreateCacheKey(#15159)[jest-each]Allow$keypathtemplates withnullorundefinedvalues (#14831)[@jest/expect-utils]Fix comparison ofDataView(#14408)[@jest/expect-utils][BREAKING] exclude non-enumerable in object matching (#14670)[@jest/expect-utils]Fix comparison ofURL(#14672)[@jest/expect-utils]CheckSymbolproperties 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 multiplehasteImplModulePaths (#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_importCoreModelso required core module is consistent if modified while loading (#15077)[jest-schemas, jest-types][BREAKING] Fix type oftestFailureExitCodeconfig option(#15232)[jest-util]Make sureisInteractiveworks in a browser (#14552)[pretty-format][BREAKING] PrintArrayBufferandDataViewcorrectly (#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
testPathPatternconfiguration option totestPathPatterns, which now takes a list of patterns instead of the regex.- [BREAKING]
--testPathPatternis now--testPathPatterns- [BREAKING] Specifying
testPathPatternswhen programmatically callingwatchmust be specified asnew TestPathPatterns(patterns), whereTestPathPatternscan be imported from@jest/pattern[jest-reporters, jest-runner]Unhandled errors without stack get correctly logged to console (#14619)[jest-util]Always loadmjsfiles withimport(#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 whereObjectContainingmatched non-object values. ([#15463])(#15463).
- Adds a
conditional/checkto ensure the argument passed toexpectis an object.- Add unit tests for new
ObjectContainingbehavior.- Remove
invalid/wrongtest case assertions forObjectContaining.[jest-worker]Addresses incorrect state on exit (#15610)Performance
[*][BREAKING] Bundle all of Jest's modules intoindex.js(#12348, #14550 & #14661)[jest-haste-map]Only spawn one process to check forwatchmaninstallation (#14826)[jest-runner]Better cleanupsource-map-supportafter test to resolve (minor) memory leak (#15233)[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(#15325CVE-2024-37890)[*]Increase version ofmicromatchto^4.0.7(#15082)[*][BREAKING] Drop support for Node.js versions 14, 16, 19, 21 and 23 (#14460, #15118, #15623, #15640)[*][BREAKING] Drop support fortypescript@4.3, minimum version is now5.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 toglob@10(#14509)[*]UseTypeErroroverErrorwhere appropriate (#14799)[docs]Fix typos inCHANGELOG.mdandpackages/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/coreto^7.11(#14109)[babel-jest, @jest/transform]Updatebabel-plugin-istanbulto v6 (#15156)[babel-plugin-jest-hoist]Move unnecessarydependenciestodevDependencies(#15010)[expect][BREAKING] Remove.toBeCalled(),.toBeCalledTimes(),.toBeCalledWith(),.lastCalledWith(),.nthCalledWith(),.toReturn(),.toReturnTimes(),.toReturnWith(),.lastReturnedWith(),.nthReturnedWith()and.toThrowError()matcher aliases (#14632)[jest-cli, jest-config, @jest/types][BREAKING] Remove deprecated--initargument (#14490)[jest-config, @jest/core, jest-util]Upgradeci-info(#14655)[jest-mock][BREAKING] RemoveMockFunctionMetadataType,MockFunctionMetadataandSpyInstancetypes (#14621)[@jest/reporters]Upgradeistanbul-lib-source-maps(#14924)[jest-schemas]Upgrade@sinclair/typebox(#14775)[jest-transform]Upgradewrite-file-atomic(#14274)[jest-util]Upgradepicomatchto v4 (#14653 & #14885)[docs] Append to NODE_OPTIONS, not overwrite ([#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)See the CHANGELOG.
Does any of this look wrong? Please let us know.
Commits
See the full diff on Github. The new version differs by more commits than we can show here.
↗️ glob (indirect, 7.2.3 → 10.4.5) · Repo · Changelog
Release Notes
10.3.0 (from changelog)
- Add
--default -pflag to provide a default pattern
10.2.0 (from changelog)
- Add glob cli
10.1.0 (from changelog)
- Return
'.'instead of the empty string''when the current working directory is returned as a match.- Add
posix: trueoption to return/delimited paths, even on Windows.
10.0.0 (from changelog)
- No default exports, only named exports
9.3.3 (from changelog)
- Upgraded minimatch to v8, adding support for any degree of nested extglob patterns.
Does any of this look wrong? Please let us know.
Commits
See the full diff on Github. The new version differs by more commits than we can show here.
↗️ istanbul-lib-source-maps (indirect, 4.0.1 → 5.0.6) · Repo · Changelog
Release Notes
5.0.6 (from changelog)
Bug Fixes
5.0.5 (from changelog)
Bug Fixes
Does any of this look wrong? Please let us know.
↗️ istanbul-reports (indirect, 3.1.7 → 3.2.0) · Repo · Changelog
Release Notes
3.2.0 (from changelog)
Features
Bug Fixes
Does any of this look wrong? Please let us know.
↗️ jest-changed-files (indirect, 29.7.0 → 30.2.0) · Repo · Changelog
Release Notes
30.2.0
Chore & Maintenance
[*]Update example repo for testing React Native projects (#15832)[*]Updatejest-watch-typeaheadto v3 (#15830)Features
[jest-environment-jsdom-abstract]Add support for JSDOM v27 (#15834)Fixes
30.0.5 (from changelog)
Features
[jest-config]AllowtestMatchto take a string value[jest-worker]LetworkerIdleMemoryLimitaccept 0 to always restart worker child processesFixes
[expect]Fixbiginterror (#15702)
30.0.2
What's Changed
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)Full Changelog: https://github.com/jestjs/jest/blob/main/CHANGELOG.md
30.0.1
What's Changed
Features
[jest-resolver]Implement thedefaultAsyncResolver(#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 deprecatejest-replpackage (#15673)[jest-resolver]Replace customisBuiltinModulewith node'sisBuiltin(#15685)New Contributors
Full Changelog: https://github.com/jestjs/jest/blob/main/CHANGELOG.md
30.0.0
Today we are happy to announce the release of Jest 30. This release features a substantial number of changes, fixes, and improvements. While it is one of the largest major releases of Jest ever, we admit that three years for a major release is too long. In the future, we are aiming to make more frequent major releases to keep Jest great for the next decade.
If you want to skip all the news and just get going, run
npm install jest@^30.0.0and follow the migration guide: Upgrading from Jest 29 to 30.Features
[*]RenamedglobalsCleanupModetoglobalsCleanupand--waitNextEventLoopTurnForUnhandledRejectionEventsto--waitForUnhandledRejections[expect]AddArrayOfasymmetric matcher for validating array elements. (#15567)[babel-jest]Add optionexcludeJestPresetto allow opting out ofbabel-preset-jest(#15164)[expect]Revert #15038 to fixexpect(fn).toHaveBeenCalledWith(expect.objectContaining(...))when there are multiple calls (#15508)[jest-circus, jest-cli, jest-config]AddwaitNextEventLoopTurnForUnhandledRejectionEventsflag to minimise performance impact of correct detection of unhandled promise rejections introduced in #14315 (#14681)[jest-circus]Add awaitBeforeRetryoption tojest.retryTimes(#14738)[jest-circus]Add aretryImmediatelyoption tojest.retryTimes(#14696)[jest-circus, jest-jasmine2]AllowsetupFilesAfterEnvto export an async function (#10962)[jest-circus, jest-test-result]AddstartedAttimestamp inTestCaseResultObjectwithinonTestCaseResult(#15145)[jest-cli]ExportbuildArgv(#15310)[jest-config][BREAKING] Addmtsandctsto defaultmoduleFileExtensionsconfig (#14369)[jest-config][BREAKING] UpdatetestMatchandtestRegexdefault option for supportingmjs,cjs,mts, andcts(#14584)[jest-config]Loads config file from provided path inpackage.json(#14044)[jest-config]Allow loadingjest.config.ctsfiles (#14070)[jest-config]ShowrootDirin error message when apresetfails to load (#15194)[jest-config]Support loading TS config files usingesbuild-registervia 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]AddperfStatsto surface test setup overhead (#14622)[@jest/core][BREAKING] Changed--filterto accept an object with shape{ filtered: Array<string> }to match documentation (#13319)[@jest/core]Support--outputFileoption for--listTests(#14980)[@jest/core]Stringify Errors properly with--jsonflag (#15329)[@jest/core, @jest/test-sequencer][BREAKING] ExposesglobalConfig&contextstoTestSequencer(#14535, & #14543)[jest-each]Introduce%$option to add number of the test to its title (#14710)[@jest/environment][BREAKING] Remove deprecatedjest.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 thejsdomenvironment, allowing usage of custom versions of JSDOM (#14717)[jest-environment-node]Update jest environment with dispose symbolsSymbol(#14888 & #14909)[expect, @jest/expect][BREAKING] Add type inference for function parameters inCalledWithassertions (#15129)[@jest/expect-utils]Properly compare all types ofTypedArrays (#15178)[@jest/fake-timers][BREAKING] Upgrade@sinonjs/fake-timersto v13 (#14544 & #15470)[@jest/fake-timers]Exposing new modern timers functionadvanceTimersToFrame()which advances all timers by the needed milliseconds to execute callbacks currently scheduled withrequestAnimationFrame(#14598)[jest-matcher-utils]AddSERIALIZABLE_PROPERTIESto allow custom serialization of objects (#14893)[jest-mock]Add support for the Explicit Resource Management proposal to use theusingkeyword withjest.spyOn(object, methodName)(#14895)[jest-reporters]Add support for DEC mode 2026 (#15008)[jest-resolver]Supportfile://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 functionjest.advanceTimersToFrame()from@jest/fake-timers(#14598)[jest-runtime]Supportimport.meta.filenameandimport.meta.dirname(available from Node 20.11) (#14854)[jest-runtime]Supportimport.meta.resolve(#14930)[jest-runtime][BREAKING] Make it mandatory to passglobalConfigto theRuntimeconstructor (#15044)[jest-runtime]Addunstable_unmockModule(#15080)[jest-runtime]AddonGenerateMocktransformer callback for auto generated callbacks (#15433 & #15482)[jest-runtime][BREAKING] Usevm.compileFunctionovervm.Script(#15461)[@jest/schemas]Upgrade@sinclair/typeboxto v0.34 (#15450)[@jest/types]test.each(): Accept a readonly (as const) table properly (#14565)[@jest/types]Improve argument type inference passed totestanddescribecallback functions fromeachtables (#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 fromjest-snapshotinto its own package (#15095)[pretty-format][BREAKING] Do not render empty string children ('') in React plugin (#14470)Fixes
[expect]ShowAggregateErrorto display (#15346)[*]Replaceexitwithexit-x(#15399)[babel-plugin-jest-hoist]Usedenylistinstead of the deprecatedblacklistfor Babel 8 support (#14109)[babel-plugin-jest-hoist]Do not rely on buggy Babel behaviour (#15415)[expect]Check error instance type fortoThrow/toThrowError(#14576)[expect]Improve diff for failingexpect.objectContaining(#15038)[expect]UseArray.isArrayto check if an array is anArray(#15101)[expect]Fix Errorcauseassertion errors (#15339)[jest-changed-files]Print underlying errors when VCS commands fail (#15052)[jest-changed-files]Abortsl rootcall if output resembles a steam locomotive (#15053)[jest-circus][BREAKING] Prevent false test failures caused by promise rejections handled asynchronously (#14315)[jest-circus]Replace recursivemakeTestResultsimplementation with iterative one (#14760)[jest-circus]Omitexpect.hasAssertions()errors if a test already has errors (#14866)[jest-circus, jest-expect, jest-snapshot]Passtest.failingtests 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 respectrunInBandoption (#14578)[jest-config]SupporttestTimeoutin project config (#14697)[jest-config]SupportcoverageReportersin project config (#14697)[jest-config]Allowreportersin project config (#14768)[jest-config]Allow Node16/NodeNext/BundlermoduleResolutionin project's tsconfig (#14739)[@jest/create-cache-key-function]Correct the return type ofcreateCacheKey(#15159)[jest-each]Allow$keypathtemplates withnullorundefinedvalues (#14831)[@jest/expect-utils]Fix comparison ofDataView(#14408)[@jest/expect-utils][BREAKING] exclude non-enumerable in object matching (#14670)[@jest/expect-utils]Fix comparison ofURL(#14672)[@jest/expect-utils]CheckSymbolproperties 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 multiplehasteImplModulePaths (#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_importCoreModelso required core module is consistent if modified while loading (#15077)[jest-schemas, jest-types][BREAKING] Fix type oftestFailureExitCodeconfig option(#15232)[jest-util]Make sureisInteractiveworks in a browser (#14552)[pretty-format][BREAKING] PrintArrayBufferandDataViewcorrectly (#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
testPathPatternconfiguration option totestPathPatterns, which now takes a list of patterns instead of the regex.- [BREAKING]
--testPathPatternis now--testPathPatterns- [BREAKING] Specifying
testPathPatternswhen programmatically callingwatchmust be specified asnew TestPathPatterns(patterns), whereTestPathPatternscan be imported from@jest/pattern[jest-reporters, jest-runner]Unhandled errors without stack get correctly logged to console (#14619)[jest-util]Always loadmjsfiles withimport(#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 whereObjectContainingmatched non-object values. ([#15463])(#15463).
- Adds a
conditional/checkto ensure the argument passed toexpectis an object.- Add unit tests for new
ObjectContainingbehavior.- Remove
invalid/wrongtest case assertions forObjectContaining.[jest-worker]Addresses incorrect state on exit (#15610)Performance
[*][BREAKING] Bundle all of Jest's modules intoindex.js(#12348, #14550 & #14661)[jest-haste-map]Only spawn one process to check forwatchmaninstallation (#14826)[jest-runner]Better cleanupsource-map-supportafter test to resolve (minor) memory leak (#15233)[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(#15325CVE-2024-37890)[*]Increase version ofmicromatchto^4.0.7(#15082)[*][BREAKING] Drop support for Node.js versions 14, 16, 19, 21 and 23 (#14460, #15118, #15623, #15640)[*][BREAKING] Drop support fortypescript@4.3, minimum version is now5.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 toglob@10(#14509)[*]UseTypeErroroverErrorwhere appropriate (#14799)[docs]Fix typos inCHANGELOG.mdandpackages/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/coreto^7.11(#14109)[babel-jest, @jest/transform]Updatebabel-plugin-istanbulto v6 (#15156)[babel-plugin-jest-hoist]Move unnecessarydependenciestodevDependencies(#15010)[expect][BREAKING] Remove.toBeCalled(),.toBeCalledTimes(),.toBeCalledWith(),.lastCalledWith(),.nthCalledWith(),.toReturn(),.toReturnTimes(),.toReturnWith(),.lastReturnedWith(),.nthReturnedWith()and.toThrowError()matcher aliases (#14632)[jest-cli, jest-config, @jest/types][BREAKING] Remove deprecated--initargument (#14490)[jest-config, @jest/core, jest-util]Upgradeci-info(#14655)[jest-mock][BREAKING] RemoveMockFunctionMetadataType,MockFunctionMetadataandSpyInstancetypes (#14621)[@jest/reporters]Upgradeistanbul-lib-source-maps(#14924)[jest-schemas]Upgrade@sinclair/typebox(#14775)[jest-transform]Upgradewrite-file-atomic(#14274)[jest-util]Upgradepicomatchto v4 (#14653 & #14885)[docs] Append to NODE_OPTIONS, not overwrite ([#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)See the CHANGELOG.
Does any of this look wrong? Please let us know.
Commits
See the full diff on Github. The new version differs by more commits than we can show here.
↗️ jest-circus (indirect, 29.7.0 → 30.2.0) · Repo · Changelog
Release Notes
30.2.0
Chore & Maintenance
[*]Update example repo for testing React Native projects (#15832)[*]Updatejest-watch-typeaheadto v3 (#15830)Features
[jest-environment-jsdom-abstract]Add support for JSDOM v27 (#15834)Fixes
30.1.3
Fixes
- Fix
unstable_mockModulewithnode:prefixed core modules.
30.1.2 (from changelog)
Fixes
[jest-snapshot-utils]Correct snapshot header regexp to work with newline across OSes (#15803)
30.1.1
Fixes
[jest-snapshot-utils]Fix deprecated goo.gl snapshot warning not handling Windows end-of-line sequences (#15800)
30.1.0
Features
[jest-leak-detector]Configurable GC aggressiveness regarding to V8 heap snapshot generation (#15793)[jest-runtime]Reduce redundant ReferenceError messages[jest-core]Include test modules that failed to load when --onlyFailures is activeFixes
- `[jest-snapshot-utils] Fix deprecated goo.gl snapshot guide link not getting replaced with fully canonical URL (#15787)
[jest-circus]Fixit.concurrentnot working withdescribe.skip(#15765)[jest-snapshot]Fix mangled inline snapshot updates when used with Prettier 3 and CRLF line endings[jest-runtime]Importing from@jest/globalsin more than one file no longer breaks relative paths (#15772)Chore
[expect]Update docblock fortoContain()to display info on substring check (#15789)
30.0.5 (from changelog)
Features
[jest-config]AllowtestMatchto take a string value[jest-worker]LetworkerIdleMemoryLimitaccept 0 to always restart worker child processesFixes
[expect]Fixbiginterror (#15702)
30.0.4 (from changelog)
Features
[expect]TheInversetype is now exported (#15714)[expect]feat: supportasync functionsintoBe(#15704)Fixes
30.0.3 (from changelog)
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)
30.0.2
What's Changed
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)Full Changelog: https://github.com/jestjs/jest/blob/main/CHANGELOG.md
30.0.1
What's Changed
Features
[jest-resolver]Implement thedefaultAsyncResolver(#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 deprecatejest-replpackage (#15673)[jest-resolver]Replace customisBuiltinModulewith node'sisBuiltin(#15685)New Contributors
Full Changelog: https://github.com/jestjs/jest/blob/main/CHANGELOG.md
30.0.0
Today we are happy to announce the release of Jest 30. This release features a substantial number of changes, fixes, and improvements. While it is one of the largest major releases of Jest ever, we admit that three years for a major release is too long. In the future, we are aiming to make more frequent major releases to keep Jest great for the next decade.
If you want to skip all the news and just get going, run
npm install jest@^30.0.0and follow the migration guide: Upgrading from Jest 29 to 30.Features
[*]RenamedglobalsCleanupModetoglobalsCleanupand--waitNextEventLoopTurnForUnhandledRejectionEventsto--waitForUnhandledRejections[expect]AddArrayOfasymmetric matcher for validating array elements. (#15567)[babel-jest]Add optionexcludeJestPresetto allow opting out ofbabel-preset-jest(#15164)[expect]Revert #15038 to fixexpect(fn).toHaveBeenCalledWith(expect.objectContaining(...))when there are multiple calls (#15508)[jest-circus, jest-cli, jest-config]AddwaitNextEventLoopTurnForUnhandledRejectionEventsflag to minimise performance impact of correct detection of unhandled promise rejections introduced in #14315 (#14681)[jest-circus]Add awaitBeforeRetryoption tojest.retryTimes(#14738)[jest-circus]Add aretryImmediatelyoption tojest.retryTimes(#14696)[jest-circus, jest-jasmine2]AllowsetupFilesAfterEnvto export an async function (#10962)[jest-circus, jest-test-result]AddstartedAttimestamp inTestCaseResultObjectwithinonTestCaseResult(#15145)[jest-cli]ExportbuildArgv(#15310)[jest-config][BREAKING] Addmtsandctsto defaultmoduleFileExtensionsconfig (#14369)[jest-config][BREAKING] UpdatetestMatchandtestRegexdefault option for supportingmjs,cjs,mts, andcts(#14584)[jest-config]Loads config file from provided path inpackage.json(#14044)[jest-config]Allow loadingjest.config.ctsfiles (#14070)[jest-config]ShowrootDirin error message when apresetfails to load (#15194)[jest-config]Support loading TS config files usingesbuild-registervia 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]AddperfStatsto surface test setup overhead (#14622)[@jest/core][BREAKING] Changed--filterto accept an object with shape{ filtered: Array<string> }to match documentation (#13319)[@jest/core]Support--outputFileoption for--listTests(#14980)[@jest/core]Stringify Errors properly with--jsonflag (#15329)[@jest/core, @jest/test-sequencer][BREAKING] ExposesglobalConfig&contextstoTestSequencer(#14535, & #14543)[jest-each]Introduce%$option to add number of the test to its title (#14710)[@jest/environment][BREAKING] Remove deprecatedjest.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 thejsdomenvironment, allowing usage of custom versions of JSDOM (#14717)[jest-environment-node]Update jest environment with dispose symbolsSymbol(#14888 & #14909)[expect, @jest/expect][BREAKING] Add type inference for function parameters inCalledWithassertions (#15129)[@jest/expect-utils]Properly compare all types ofTypedArrays (#15178)[@jest/fake-timers][BREAKING] Upgrade@sinonjs/fake-timersto v13 (#14544 & #15470)[@jest/fake-timers]Exposing new modern timers functionadvanceTimersToFrame()which advances all timers by the needed milliseconds to execute callbacks currently scheduled withrequestAnimationFrame(#14598)[jest-matcher-utils]AddSERIALIZABLE_PROPERTIESto allow custom serialization of objects (#14893)[jest-mock]Add support for the Explicit Resource Management proposal to use theusingkeyword withjest.spyOn(object, methodName)(#14895)[jest-reporters]Add support for DEC mode 2026 (#15008)[jest-resolver]Supportfile://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 functionjest.advanceTimersToFrame()from@jest/fake-timers(#14598)[jest-runtime]Supportimport.meta.filenameandimport.meta.dirname(available from Node 20.11) (#14854)[jest-runtime]Supportimport.meta.resolve(#14930)[jest-runtime][BREAKING] Make it mandatory to passglobalConfigto theRuntimeconstructor (#15044)[jest-runtime]Addunstable_unmockModule(#15080)[jest-runtime]AddonGenerateMocktransformer callback for auto generated callbacks (#15433 & #15482)[jest-runtime][BREAKING] Usevm.compileFunctionovervm.Script(#15461)[@jest/schemas]Upgrade@sinclair/typeboxto v0.34 (#15450)[@jest/types]test.each(): Accept a readonly (as const) table properly (#14565)[@jest/types]Improve argument type inference passed totestanddescribecallback functions fromeachtables (#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 fromjest-snapshotinto its own package (#15095)[pretty-format][BREAKING] Do not render empty string children ('') in React plugin (#14470)Fixes
[expect]ShowAggregateErrorto display (#15346)[*]Replaceexitwithexit-x(#15399)[babel-plugin-jest-hoist]Usedenylistinstead of the deprecatedblacklistfor Babel 8 support (#14109)[babel-plugin-jest-hoist]Do not rely on buggy Babel behaviour (#15415)[expect]Check error instance type fortoThrow/toThrowError(#14576)[expect]Improve diff for failingexpect.objectContaining(#15038)[expect]UseArray.isArrayto check if an array is anArray(#15101)[expect]Fix Errorcauseassertion errors (#15339)[jest-changed-files]Print underlying errors when VCS commands fail (#15052)[jest-changed-files]Abortsl rootcall if output resembles a steam locomotive (#15053)[jest-circus][BREAKING] Prevent false test failures caused by promise rejections handled asynchronously (#14315)[jest-circus]Replace recursivemakeTestResultsimplementation with iterative one (#14760)[jest-circus]Omitexpect.hasAssertions()errors if a test already has errors (#14866)[jest-circus, jest-expect, jest-snapshot]Passtest.failingtests 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 respectrunInBandoption (#14578)[jest-config]SupporttestTimeoutin project config (#14697)[jest-config]SupportcoverageReportersin project config (#14697)[jest-config]Allowreportersin project config (#14768)[jest-config]Allow Node16/NodeNext/BundlermoduleResolutionin project's tsconfig (#14739)[@jest/create-cache-key-function]Correct the return type ofcreateCacheKey(#15159)[jest-each]Allow$keypathtemplates withnullorundefinedvalues (#14831)[@jest/expect-utils]Fix comparison ofDataView(#14408)[@jest/expect-utils][BREAKING] exclude non-enumerable in object matching (#14670)[@jest/expect-utils]Fix comparison ofURL(#14672)[@jest/expect-utils]CheckSymbolproperties 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 multiplehasteImplModulePaths (#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_importCoreModelso required core module is consistent if modified while loading (#15077)[jest-schemas, jest-types][BREAKING] Fix type oftestFailureExitCodeconfig option(#15232)[jest-util]Make sureisInteractiveworks in a browser (#14552)[pretty-format][BREAKING] PrintArrayBufferandDataViewcorrectly (#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
testPathPatternconfiguration option totestPathPatterns, which now takes a list of patterns instead of the regex.- [BREAKING]
--testPathPatternis now--testPathPatterns- [BREAKING] Specifying
testPathPatternswhen programmatically callingwatchmust be specified asnew TestPathPatterns(patterns), whereTestPathPatternscan be imported from@jest/pattern[jest-reporters, jest-runner]Unhandled errors without stack get correctly logged to console (#14619)[jest-util]Always loadmjsfiles withimport(#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 whereObjectContainingmatched non-object values. ([#15463])(#15463).
- Adds a
conditional/checkto ensure the argument passed toexpectis an object.- Add unit tests for new
ObjectContainingbehavior.- Remove
invalid/wrongtest case assertions forObjectContaining.[jest-worker]Addresses incorrect state on exit (#15610)Performance
[*][BREAKING] Bundle all of Jest's modules intoindex.js(#12348, #14550 & #14661)[jest-haste-map]Only spawn one process to check forwatchmaninstallation (#14826)[jest-runner]Better cleanupsource-map-supportafter test to resolve (minor) memory leak (#15233)[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(#15325CVE-2024-37890)[*]Increase version ofmicromatchto^4.0.7(#15082)[*][BREAKING] Drop support for Node.js versions 14, 16, 19, 21 and 23 (#14460, #15118, #15623, #15640)[*][BREAKING] Drop support fortypescript@4.3, minimum version is now5.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 toglob@10(#14509)[*]UseTypeErroroverErrorwhere appropriate (#14799)[docs]Fix typos inCHANGELOG.mdandpackages/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/coreto^7.11(#14109)[babel-jest, @jest/transform]Updatebabel-plugin-istanbulto v6 (#15156)[babel-plugin-jest-hoist]Move unnecessarydependenciestodevDependencies(#15010)[expect][BREAKING] Remove.toBeCalled(),.toBeCalledTimes(),.toBeCalledWith(),.lastCalledWith(),.nthCalledWith(),.toReturn(),.toReturnTimes(),.toReturnWith(),.lastReturnedWith(),.nthReturnedWith()and.toThrowError()matcher aliases (#14632)[jest-cli, jest-config, @jest/types][BREAKING] Remove deprecated--initargument (#14490)[jest-config, @jest/core, jest-util]Upgradeci-info(#14655)[jest-mock][BREAKING] RemoveMockFunctionMetadataType,MockFunctionMetadataandSpyInstancetypes (#14621)[@jest/reporters]Upgradeistanbul-lib-source-maps(#14924)[jest-schemas]Upgrade@sinclair/typebox(#14775)[jest-transform]Upgradewrite-file-atomic(#14274)[jest-util]Upgradepicomatchto v4 (#14653 & #14885)[docs] Append to NODE_OPTIONS, not overwrite ([#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)See the CHANGELOG.
Does any of this look wrong? Please let us know.
Commits
See the full diff on Github. The new version differs by more commits than we can show here.
↗️ jest-cli (indirect, 29.7.0 → 30.2.0) · Repo · Changelog
Release Notes
30.2.0
Chore & Maintenance
[*]Update example repo for testing React Native projects (#15832)[*]Updatejest-watch-typeaheadto v3 (#15830)Features
[jest-environment-jsdom-abstract]Add support for JSDOM v27 (#15834)Fixes
30.1.3
Fixes
- Fix
unstable_mockModulewithnode:prefixed core modules.
30.1.2 (from changelog)
Fixes
[jest-snapshot-utils]Correct snapshot header regexp to work with newline across OSes (#15803)
30.1.1
Fixes
[jest-snapshot-utils]Fix deprecated goo.gl snapshot warning not handling Windows end-of-line sequences (#15800)
30.1.0
Features
[jest-leak-detector]Configurable GC aggressiveness regarding to V8 heap snapshot generation (#15793)[jest-runtime]Reduce redundant ReferenceError messages[jest-core]Include test modules that failed to load when --onlyFailures is activeFixes
- `[jest-snapshot-utils] Fix deprecated goo.gl snapshot guide link not getting replaced with fully canonical URL (#15787)
[jest-circus]Fixit.concurrentnot working withdescribe.skip(#15765)[jest-snapshot]Fix mangled inline snapshot updates when used with Prettier 3 and CRLF line endings[jest-runtime]Importing from@jest/globalsin more than one file no longer breaks relative paths (#15772)Chore
[expect]Update docblock fortoContain()to display info on substring check (#15789)
30.0.5 (from changelog)
Features
[jest-config]AllowtestMatchto take a string value[jest-worker]LetworkerIdleMemoryLimitaccept 0 to always restart worker child processesFixes
[expect]Fixbiginterror (#15702)
30.0.4 (from changelog)
Features
[expect]TheInversetype is now exported (#15714)[expect]feat: supportasync functionsintoBe(#15704)Fixes
30.0.3 (from changelog)
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)
30.0.2
What's Changed
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)Full Changelog: https://github.com/jestjs/jest/blob/main/CHANGELOG.md
30.0.1
What's Changed
Features
[jest-resolver]Implement thedefaultAsyncResolver(#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 deprecatejest-replpackage (#15673)[jest-resolver]Replace customisBuiltinModulewith node'sisBuiltin(#15685)New Contributors
Full Changelog: https://github.com/jestjs/jest/blob/main/CHANGELOG.md
30.0.0
Today we are happy to announce the release of Jest 30. This release features a substantial number of changes, fixes, and improvements. While it is one of the largest major releases of Jest ever, we admit that three years for a major release is too long. In the future, we are aiming to make more frequent major releases to keep Jest great for the next decade.
If you want to skip all the news and just get going, run
npm install jest@^30.0.0and follow the migration guide: Upgrading from Jest 29 to 30.Features
[*]RenamedglobalsCleanupModetoglobalsCleanupand--waitNextEventLoopTurnForUnhandledRejectionEventsto--waitForUnhandledRejections[expect]AddArrayOfasymmetric matcher for validating array elements. (#15567)[babel-jest]Add optionexcludeJestPresetto allow opting out ofbabel-preset-jest(#15164)[expect]Revert #15038 to fixexpect(fn).toHaveBeenCalledWith(expect.objectContaining(...))when there are multiple calls (#15508)[jest-circus, jest-cli, jest-config]AddwaitNextEventLoopTurnForUnhandledRejectionEventsflag to minimise performance impact of correct detection of unhandled promise rejections introduced in #14315 (#14681)[jest-circus]Add awaitBeforeRetryoption tojest.retryTimes(#14738)[jest-circus]Add aretryImmediatelyoption tojest.retryTimes(#14696)[jest-circus, jest-jasmine2]AllowsetupFilesAfterEnvto export an async function (#10962)[jest-circus, jest-test-result]AddstartedAttimestamp inTestCaseResultObjectwithinonTestCaseResult(#15145)[jest-cli]ExportbuildArgv(#15310)[jest-config][BREAKING] Addmtsandctsto defaultmoduleFileExtensionsconfig (#14369)[jest-config][BREAKING] UpdatetestMatchandtestRegexdefault option for supportingmjs,cjs,mts, andcts(#14584)[jest-config]Loads config file from provided path inpackage.json(#14044)[jest-config]Allow loadingjest.config.ctsfiles (#14070)[jest-config]ShowrootDirin error message when apresetfails to load (#15194)[jest-config]Support loading TS config files usingesbuild-registervia 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]AddperfStatsto surface test setup overhead (#14622)[@jest/core][BREAKING] Changed--filterto accept an object with shape{ filtered: Array<string> }to match documentation (#13319)[@jest/core]Support--outputFileoption for--listTests(#14980)[@jest/core]Stringify Errors properly with--jsonflag (#15329)[@jest/core, @jest/test-sequencer][BREAKING] ExposesglobalConfig&contextstoTestSequencer(#14535, & #14543)[jest-each]Introduce%$option to add number of the test to its title (#14710)[@jest/environment][BREAKING] Remove deprecatedjest.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 thejsdomenvironment, allowing usage of custom versions of JSDOM (#14717)[jest-environment-node]Update jest environment with dispose symbolsSymbol(#14888 & #14909)[expect, @jest/expect][BREAKING] Add type inference for function parameters inCalledWithassertions (#15129)[@jest/expect-utils]Properly compare all types ofTypedArrays (#15178)[@jest/fake-timers][BREAKING] Upgrade@sinonjs/fake-timersto v13 (#14544 & #15470)[@jest/fake-timers]Exposing new modern timers functionadvanceTimersToFrame()which advances all timers by the needed milliseconds to execute callbacks currently scheduled withrequestAnimationFrame(#14598)[jest-matcher-utils]AddSERIALIZABLE_PROPERTIESto allow custom serialization of objects (#14893)[jest-mock]Add support for the Explicit Resource Management proposal to use theusingkeyword withjest.spyOn(object, methodName)(#14895)[jest-reporters]Add support for DEC mode 2026 (#15008)[jest-resolver]Supportfile://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 functionjest.advanceTimersToFrame()from@jest/fake-timers(#14598)[jest-runtime]Supportimport.meta.filenameandimport.meta.dirname(available from Node 20.11) (#14854)[jest-runtime]Supportimport.meta.resolve(#14930)[jest-runtime][BREAKING] Make it mandatory to passglobalConfigto theRuntimeconstructor (#15044)[jest-runtime]Addunstable_unmockModule(#15080)[jest-runtime]AddonGenerateMocktransformer callback for auto generated callbacks (#15433 & #15482)[jest-runtime][BREAKING] Usevm.compileFunctionovervm.Script(#15461)[@jest/schemas]Upgrade@sinclair/typeboxto v0.34 (#15450)[@jest/types]test.each(): Accept a readonly (as const) table properly (#14565)[@jest/types]Improve argument type inference passed totestanddescribecallback functions fromeachtables (#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 fromjest-snapshotinto its own package (#15095)[pretty-format][BREAKING] Do not render empty string children ('') in React plugin (#14470)Fixes
[expect]ShowAggregateErrorto display (#15346)[*]Replaceexitwithexit-x(#15399)[babel-plugin-jest-hoist]Usedenylistinstead of the deprecatedblacklistfor Babel 8 support (#14109)[babel-plugin-jest-hoist]Do not rely on buggy Babel behaviour (#15415)[expect]Check error instance type fortoThrow/toThrowError(#14576)[expect]Improve diff for failingexpect.objectContaining(#15038)[expect]UseArray.isArrayto check if an array is anArray(#15101)[expect]Fix Errorcauseassertion errors (#15339)[jest-changed-files]Print underlying errors when VCS commands fail (#15052)[jest-changed-files]Abortsl rootcall if output resembles a steam locomotive (#15053)[jest-circus][BREAKING] Prevent false test failures caused by promise rejections handled asynchronously (#14315)[jest-circus]Replace recursivemakeTestResultsimplementation with iterative one (#14760)[jest-circus]Omitexpect.hasAssertions()errors if a test already has errors (#14866)[jest-circus, jest-expect, jest-snapshot]Passtest.failingtests 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 respectrunInBandoption (#14578)[jest-config]SupporttestTimeoutin project config (#14697)[jest-config]SupportcoverageReportersin project config (#14697)[jest-config]Allowreportersin project config (#14768)[jest-config]Allow Node16/NodeNext/BundlermoduleResolutionin project's tsconfig (#14739)[@jest/create-cache-key-function]Correct the return type ofcreateCacheKey(#15159)[jest-each]Allow$keypathtemplates withnullorundefinedvalues (#14831)[@jest/expect-utils]Fix comparison ofDataView(#14408)[@jest/expect-utils][BREAKING] exclude non-enumerable in object matching (#14670)[@jest/expect-utils]Fix comparison ofURL(#14672)[@jest/expect-utils]CheckSymbolproperties 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 multiplehasteImplModulePaths (#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_importCoreModelso required core module is consistent if modified while loading (#15077)[jest-schemas, jest-types][BREAKING] Fix type oftestFailureExitCodeconfig option(#15232)[jest-util]Make sureisInteractiveworks in a browser (#14552)[pretty-format][BREAKING] PrintArrayBufferandDataViewcorrectly (#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
testPathPatternconfiguration option totestPathPatterns, which now takes a list of patterns instead of the regex.- [BREAKING]
--testPathPatternis now--testPathPatterns- [BREAKING] Specifying
testPathPatternswhen programmatically callingwatchmust be specified asnew TestPathPatterns(patterns), whereTestPathPatternscan be imported from@jest/pattern[jest-reporters, jest-runner]Unhandled errors without stack get correctly logged to console (#14619)[jest-util]Always loadmjsfiles withimport(#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 whereObjectContainingmatched non-object values. ([#15463])(#15463).
- Adds a
conditional/checkto ensure the argument passed toexpectis an object.- Add unit tests for new
ObjectContainingbehavior.- Remove
invalid/wrongtest case assertions forObjectContaining.[jest-worker]Addresses incorrect state on exit (#15610)Performance
[*][BREAKING] Bundle all of Jest's modules intoindex.js(#12348, #14550 & #14661)[jest-haste-map]Only spawn one process to check forwatchmaninstallation (#14826)[jest-runner]Better cleanupsource-map-supportafter test to resolve (minor) memory leak (#15233)[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(#15325CVE-2024-37890)[*]Increase version ofmicromatchto^4.0.7(#15082)[*][BREAKING] Drop support for Node.js versions 14, 16, 19, 21 and 23 (#14460, #15118, #15623, #15640)[*][BREAKING] Drop support fortypescript@4.3, minimum version is now5.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 toglob@10(#14509)[*]UseTypeErroroverErrorwhere appropriate (#14799)[docs]Fix typos inCHANGELOG.mdandpackages/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/coreto^7.11(#14109)[babel-jest, @jest/transform]Updatebabel-plugin-istanbulto v6 (#15156)[babel-plugin-jest-hoist]Move unnecessarydependenciestodevDependencies(#15010)[expect][BREAKING] Remove.toBeCalled(),.toBeCalledTimes(),.toBeCalledWith(),.lastCalledWith(),.nthCalledWith(),.toReturn(),.toReturnTimes(),.toReturnWith(),.lastReturnedWith(),.nthReturnedWith()and.toThrowError()matcher aliases (#14632)[jest-cli, jest-config, @jest/types][BREAKING] Remove deprecated--initargument (#14490)[jest-config, @jest/core, jest-util]Upgradeci-info(#14655)[jest-mock][BREAKING] RemoveMockFunctionMetadataType,MockFunctionMetadataandSpyInstancetypes (#14621)[@jest/reporters]Upgradeistanbul-lib-source-maps(#14924)[jest-schemas]Upgrade@sinclair/typebox(#14775)[jest-transform]Upgradewrite-file-atomic(#14274)[jest-util]Upgradepicomatchto v4 (#14653 & #14885)[docs] Append to NODE_OPTIONS, not overwrite ([#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)See the CHANGELOG.
Does any of this look wrong? Please let us know.
Commits
See the full diff on Github. The new version differs by more commits than we can show here.
↗️ jest-config (indirect, 29.7.0 → 30.2.0) · Repo · Changelog
Release Notes
30.2.0
Chore & Maintenance
[*]Update example repo for testing React Native projects (#15832)[*]Updatejest-watch-typeaheadto v3 (#15830)Features
[jest-environment-jsdom-abstract]Add support for JSDOM v27 (#15834)Fixes
30.1.3
Fixes
- Fix
unstable_mockModulewithnode:prefixed core modules.
30.1.2 (from changelog)
Fixes
[jest-snapshot-utils]Correct snapshot header regexp to work with newline across OSes (#15803)
30.1.1
Fixes
[jest-snapshot-utils]Fix deprecated goo.gl snapshot warning not handling Windows end-of-line sequences (#15800)
30.1.0
Features
[jest-leak-detector]Configurable GC aggressiveness regarding to V8 heap snapshot generation (#15793)[jest-runtime]Reduce redundant ReferenceError messages[jest-core]Include test modules that failed to load when --onlyFailures is activeFixes
- `[jest-snapshot-utils] Fix deprecated goo.gl snapshot guide link not getting replaced with fully canonical URL (#15787)
[jest-circus]Fixit.concurrentnot working withdescribe.skip(#15765)[jest-snapshot]Fix mangled inline snapshot updates when used with Prettier 3 and CRLF line endings[jest-runtime]Importing from@jest/globalsin more than one file no longer breaks relative paths (#15772)Chore
[expect]Update docblock fortoContain()to display info on substring check (#15789)
30.0.5 (from changelog)
Features
[jest-config]AllowtestMatchto take a string value[jest-worker]LetworkerIdleMemoryLimitaccept 0 to always restart worker child processesFixes
[expect]Fixbiginterror (#15702)
30.0.4 (from changelog)
Features
[expect]TheInversetype is now exported (#15714)[expect]feat: supportasync functionsintoBe(#15704)Fixes
30.0.3 (from changelog)
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)
30.0.2
What's Changed
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)Full Changelog: https://github.com/jestjs/jest/blob/main/CHANGELOG.md
30.0.1
What's Changed
Features
[jest-resolver]Implement thedefaultAsyncResolver(#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 deprecatejest-replpackage (#15673)[jest-resolver]Replace customisBuiltinModulewith node'sisBuiltin(#15685)New Contributors
Full Changelog: https://github.com/jestjs/jest/blob/main/CHANGELOG.md
30.0.0
Today we are happy to announce the release of Jest 30. This release features a substantial number of changes, fixes, and improvements. While it is one of the largest major releases of Jest ever, we admit that three years for a major release is too long. In the future, we are aiming to make more frequent major releases to keep Jest great for the next decade.
If you want to skip all the news and just get going, run
npm install jest@^30.0.0and follow the migration guide: Upgrading from Jest 29 to 30.Features
[*]RenamedglobalsCleanupModetoglobalsCleanupand--waitNextEventLoopTurnForUnhandledRejectionEventsto--waitForUnhandledRejections[expect]AddArrayOfasymmetric matcher for validating array elements. (#15567)[babel-jest]Add optionexcludeJestPresetto allow opting out ofbabel-preset-jest(#15164)[expect]Revert #15038 to fixexpect(fn).toHaveBeenCalledWith(expect.objectContaining(...))when there are multiple calls (#15508)[jest-circus, jest-cli, jest-config]AddwaitNextEventLoopTurnForUnhandledRejectionEventsflag to minimise performance impact of correct detection of unhandled promise rejections introduced in #14315 (#14681)[jest-circus]Add awaitBeforeRetryoption tojest.retryTimes(#14738)[jest-circus]Add aretryImmediatelyoption tojest.retryTimes(#14696)[jest-circus, jest-jasmine2]AllowsetupFilesAfterEnvto export an async function (#10962)[jest-circus, jest-test-result]AddstartedAttimestamp inTestCaseResultObjectwithinonTestCaseResult(#15145)[jest-cli]ExportbuildArgv(#15310)[jest-config][BREAKING] Addmtsandctsto defaultmoduleFileExtensionsconfig (#14369)[jest-config][BREAKING] UpdatetestMatchandtestRegexdefault option for supportingmjs,cjs,mts, andcts(#14584)[jest-config]Loads config file from provided path inpackage.json(#14044)[jest-config]Allow loadingjest.config.ctsfiles (#14070)[jest-config]ShowrootDirin error message when apresetfails to load (#15194)[jest-config]Support loading TS config files usingesbuild-registervia 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]AddperfStatsto surface test setup overhead (#14622)[@jest/core][BREAKING] Changed--filterto accept an object with shape{ filtered: Array<string> }to match documentation (#13319)[@jest/core]Support--outputFileoption for--listTests(#14980)[@jest/core]Stringify Errors properly with--jsonflag (#15329)[@jest/core, @jest/test-sequencer][BREAKING] ExposesglobalConfig&contextstoTestSequencer(#14535, & #14543)[jest-each]Introduce%$option to add number of the test to its title (#14710)[@jest/environment][BREAKING] Remove deprecatedjest.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 thejsdomenvironment, allowing usage of custom versions of JSDOM (#14717)[jest-environment-node]Update jest environment with dispose symbolsSymbol(#14888 & #14909)[expect, @jest/expect][BREAKING] Add type inference for function parameters inCalledWithassertions (#15129)[@jest/expect-utils]Properly compare all types ofTypedArrays (#15178)[@jest/fake-timers][BREAKING] Upgrade@sinonjs/fake-timersto v13 (#14544 & #15470)[@jest/fake-timers]Exposing new modern timers functionadvanceTimersToFrame()which advances all timers by the needed milliseconds to execute callbacks currently scheduled withrequestAnimationFrame(#14598)[jest-matcher-utils]AddSERIALIZABLE_PROPERTIESto allow custom serialization of objects (#14893)[jest-mock]Add support for the Explicit Resource Management proposal to use theusingkeyword withjest.spyOn(object, methodName)(#14895)[jest-reporters]Add support for DEC mode 2026 (#15008)[jest-resolver]Supportfile://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 functionjest.advanceTimersToFrame()from@jest/fake-timers(#14598)[jest-runtime]Supportimport.meta.filenameandimport.meta.dirname(available from Node 20.11) (#14854)[jest-runtime]Supportimport.meta.resolve(#14930)[jest-runtime][BREAKING] Make it mandatory to passglobalConfigto theRuntimeconstructor (#15044)[jest-runtime]Addunstable_unmockModule(#15080)[jest-runtime]AddonGenerateMocktransformer callback for auto generated callbacks (#15433 & #15482)[jest-runtime][BREAKING] Usevm.compileFunctionovervm.Script(#15461)[@jest/schemas]Upgrade@sinclair/typeboxto v0.34 (#15450)[@jest/types]test.each(): Accept a readonly (as const) table properly (#14565)[@jest/types]Improve argument type inference passed totestanddescribecallback functions fromeachtables (#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 fromjest-snapshotinto its own package (#15095)[pretty-format][BREAKING] Do not render empty string children ('') in React plugin (#14470)Fixes
[expect]ShowAggregateErrorto display (#15346)[*]Replaceexitwithexit-x(#15399)[babel-plugin-jest-hoist]Usedenylistinstead of the deprecatedblacklistfor Babel 8 support (#14109)[babel-plugin-jest-hoist]Do not rely on buggy Babel behaviour (#15415)[expect]Check error instance type fortoThrow/toThrowError(#14576)[expect]Improve diff for failingexpect.objectContaining(#15038)[expect]UseArray.isArrayto check if an array is anArray(#15101)[expect]Fix Errorcauseassertion errors (#15339)[jest-changed-files]Print underlying errors when VCS commands fail (#15052)[jest-changed-files]Abortsl rootcall if output resembles a steam locomotive (#15053)[jest-circus][BREAKING] Prevent false test failures caused by promise rejections handled asynchronously (#14315)[jest-circus]Replace recursivemakeTestResultsimplementation with iterative one (#14760)[jest-circus]Omitexpect.hasAssertions()errors if a test already has errors (#14866)[jest-circus, jest-expect, jest-snapshot]Passtest.failingtests 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 respectrunInBandoption (#14578)[jest-config]SupporttestTimeoutin project config (#14697)[jest-config]SupportcoverageReportersin project config (#14697)[jest-config]Allowreportersin project config (#14768)[jest-config]Allow Node16/NodeNext/BundlermoduleResolutionin project's tsconfig (#14739)[@jest/create-cache-key-function]Correct the return type ofcreateCacheKey(#15159)[jest-each]Allow$keypathtemplates withnullorundefinedvalues (#14831)[@jest/expect-utils]Fix comparison ofDataView(#14408)[@jest/expect-utils][BREAKING] exclude non-enumerable in object matching (#14670)[@jest/expect-utils]Fix comparison ofURL(#14672)[@jest/expect-utils]CheckSymbolproperties 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 multiplehasteImplModulePaths (#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_importCoreModelso required core module is consistent if modified while loading (#15077)[jest-schemas, jest-types][BREAKING] Fix type oftestFailureExitCodeconfig option(#15232)[jest-util]Make sureisInteractiveworks in a browser (#14552)[pretty-format][BREAKING] PrintArrayBufferandDataViewcorrectly (#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
testPathPatternconfiguration option totestPathPatterns, which now takes a list of patterns instead of the regex.- [BREAKING]
--testPathPatternis now--testPathPatterns- [BREAKING] Specifying
testPathPatternswhen programmatically callingwatchmust be specified asnew TestPathPatterns(patterns), whereTestPathPatternscan be imported from@jest/pattern[jest-reporters, jest-runner]Unhandled errors without stack get correctly logged to console (#14619)[jest-util]Always loadmjsfiles withimport(#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 whereObjectContainingmatched non-object values. ([#15463])(#15463).
- Adds a
conditional/checkto ensure the argument passed toexpectis an object.- Add unit tests for new
ObjectContainingbehavior.- Remove
invalid/wrongtest case assertions forObjectContaining.[jest-worker]Addresses incorrect state on exit (#15610)Performance
[*][BREAKING] Bundle all of Jest's modules intoindex.js(#12348, #14550 & #14661)[jest-haste-map]Only spawn one process to check forwatchmaninstallation (#14826)[jest-runner]Better cleanupsource-map-supportafter test to resolve (minor) memory leak (#15233)[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(#15325CVE-2024-37890)[*]Increase version ofmicromatchto^4.0.7(#15082)[*][BREAKING] Drop support for Node.js versions 14, 16, 19, 21 and 23 (#14460, #15118, #15623, #15640)[*][BREAKING] Drop support fortypescript@4.3, minimum version is now5.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 toglob@10(#14509)[*]UseTypeErroroverErrorwhere appropriate (#14799)[docs]Fix typos inCHANGELOG.mdandpackages/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/coreto^7.11(#14109)[babel-jest, @jest/transform]Updatebabel-plugin-istanbulto v6 (#15156)[babel-plugin-jest-hoist]Move unnecessarydependenciestodevDependencies(#15010)[expect][BREAKING] Remove.toBeCalled(),.toBeCalledTimes(),.toBeCalledWith(),.lastCalledWith(),.nthCalledWith(),.toReturn(),.toReturnTimes(),.toReturnWith(),.lastReturnedWith(),.nthReturnedWith()and.toThrowError()matcher aliases (#14632)[jest-cli, jest-config, @jest/types][BREAKING] Remove deprecated--initargument (#14490)[jest-config, @jest/core, jest-util]Upgradeci-info(#14655)[jest-mock][BREAKING] RemoveMockFunctionMetadataType,MockFunctionMetadataandSpyInstancetypes (#14621)[@jest/reporters]Upgradeistanbul-lib-source-maps(#14924)[jest-schemas]Upgrade@sinclair/typebox(#14775)[jest-transform]Upgradewrite-file-atomic(#14274)[jest-util]Upgradepicomatchto v4 (#14653 & #14885)[docs] Append to NODE_OPTIONS, not overwrite ([#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)See the CHANGELOG.
Does any of this look wrong? Please let us know.
Commits
See the full diff on Github. The new version differs by more commits than we can show here.
↗️ jest-diff (indirect, 29.7.0 → 30.2.0) · Repo · Changelog
Release Notes
30.2.0
Chore & Maintenance
[*]Update example repo for testing React Native projects (#15832)[*]Updatejest-watch-typeaheadto v3 (#15830)Features
[jest-environment-jsdom-abstract]Add support for JSDOM v27 (#15834)Fixes
30.1.1
Fixes
[jest-snapshot-utils]Fix deprecated goo.gl snapshot warning not handling Windows end-of-line sequences (#15800)
30.1.0
Features
[jest-leak-detector]Configurable GC aggressiveness regarding to V8 heap snapshot generation (#15793)[jest-runtime]Reduce redundant ReferenceError messages[jest-core]Include test modules that failed to load when --onlyFailures is activeFixes
- `[jest-snapshot-utils] Fix deprecated goo.gl snapshot guide link not getting replaced with fully canonical URL (#15787)
[jest-circus]Fixit.concurrentnot working withdescribe.skip(#15765)[jest-snapshot]Fix mangled inline snapshot updates when used with Prettier 3 and CRLF line endings[jest-runtime]Importing from@jest/globalsin more than one file no longer breaks relative paths (#15772)Chore
[expect]Update docblock fortoContain()to display info on substring check (#15789)
30.0.5 (from changelog)
Features
[jest-config]AllowtestMatchto take a string value[jest-worker]LetworkerIdleMemoryLimitaccept 0 to always restart worker child processesFixes
[expect]Fixbiginterror (#15702)
30.0.4 (from changelog)
Features
[expect]TheInversetype is now exported (#15714)[expect]feat: supportasync functionsintoBe(#15704)Fixes
30.0.3 (from changelog)
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)
30.0.2
What's Changed
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)Full Changelog: https://github.com/jestjs/jest/blob/main/CHANGELOG.md
30.0.1
What's Changed
Features
[jest-resolver]Implement thedefaultAsyncResolver(#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 deprecatejest-replpackage (#15673)[jest-resolver]Replace customisBuiltinModulewith node'sisBuiltin(#15685)New Contributors
Full Changelog: https://github.com/jestjs/jest/blob/main/CHANGELOG.md
30.0.0
Today we are happy to announce the release of Jest 30. This release features a substantial number of changes, fixes, and improvements. While it is one of the largest major releases of Jest ever, we admit that three years for a major release is too long. In the future, we are aiming to make more frequent major releases to keep Jest great for the next decade.
If you want to skip all the news and just get going, run
npm install jest@^30.0.0and follow the migration guide: Upgrading from Jest 29 to 30.Features
[*]RenamedglobalsCleanupModetoglobalsCleanupand--waitNextEventLoopTurnForUnhandledRejectionEventsto--waitForUnhandledRejections[expect]AddArrayOfasymmetric matcher for validating array elements. (#15567)[babel-jest]Add optionexcludeJestPresetto allow opting out ofbabel-preset-jest(#15164)[expect]Revert #15038 to fixexpect(fn).toHaveBeenCalledWith(expect.objectContaining(...))when there are multiple calls (#15508)[jest-circus, jest-cli, jest-config]AddwaitNextEventLoopTurnForUnhandledRejectionEventsflag to minimise performance impact of correct detection of unhandled promise rejections introduced in #14315 (#14681)[jest-circus]Add awaitBeforeRetryoption tojest.retryTimes(#14738)[jest-circus]Add aretryImmediatelyoption tojest.retryTimes(#14696)[jest-circus, jest-jasmine2]AllowsetupFilesAfterEnvto export an async function (#10962)[jest-circus, jest-test-result]AddstartedAttimestamp inTestCaseResultObjectwithinonTestCaseResult(#15145)[jest-cli]ExportbuildArgv(#15310)[jest-config][BREAKING] Addmtsandctsto defaultmoduleFileExtensionsconfig (#14369)[jest-config][BREAKING] UpdatetestMatchandtestRegexdefault option for supportingmjs,cjs,mts, andcts(#14584)[jest-config]Loads config file from provided path inpackage.json(#14044)[jest-config]Allow loadingjest.config.ctsfiles (#14070)[jest-config]ShowrootDirin error message when apresetfails to load (#15194)[jest-config]Support loading TS config files usingesbuild-registervia 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]AddperfStatsto surface test setup overhead (#14622)[@jest/core][BREAKING] Changed--filterto accept an object with shape{ filtered: Array<string> }to match documentation (#13319)[@jest/core]Support--outputFileoption for--listTests(#14980)[@jest/core]Stringify Errors properly with--jsonflag (#15329)[@jest/core, @jest/test-sequencer][BREAKING] ExposesglobalConfig&contextstoTestSequencer(#14535, & #14543)[jest-each]Introduce%$option to add number of the test to its title (#14710)[@jest/environment][BREAKING] Remove deprecatedjest.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 thejsdomenvironment, allowing usage of custom versions of JSDOM (#14717)[jest-environment-node]Update jest environment with dispose symbolsSymbol(#14888 & #14909)[expect, @jest/expect][BREAKING] Add type inference for function parameters inCalledWithassertions (#15129)[@jest/expect-utils]Properly compare all types ofTypedArrays (#15178)[@jest/fake-timers][BREAKING] Upgrade@sinonjs/fake-timersto v13 (#14544 & #15470)[@jest/fake-timers]Exposing new modern timers functionadvanceTimersToFrame()which advances all timers by the needed milliseconds to execute callbacks currently scheduled withrequestAnimationFrame(#14598)[jest-matcher-utils]AddSERIALIZABLE_PROPERTIESto allow custom serialization of objects (#14893)[jest-mock]Add support for the Explicit Resource Management proposal to use theusingkeyword withjest.spyOn(object, methodName)(#14895)[jest-reporters]Add support for DEC mode 2026 (#15008)[jest-resolver]Supportfile://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 functionjest.advanceTimersToFrame()from@jest/fake-timers(#14598)[jest-runtime]Supportimport.meta.filenameandimport.meta.dirname(available from Node 20.11) (#14854)[jest-runtime]Supportimport.meta.resolve(#14930)[jest-runtime][BREAKING] Make it mandatory to passglobalConfigto theRuntimeconstructor (#15044)[jest-runtime]Addunstable_unmockModule(#15080)[jest-runtime]AddonGenerateMocktransformer callback for auto generated callbacks (#15433 & #15482)[jest-runtime][BREAKING] Usevm.compileFunctionovervm.Script(#15461)[@jest/schemas]Upgrade@sinclair/typeboxto v0.34 (#15450)[@jest/types]test.each(): Accept a readonly (as const) table properly (#14565)[@jest/types]Improve argument type inference passed totestanddescribecallback functions fromeachtables (#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 fromjest-snapshotinto its own package (#15095)[pretty-format][BREAKING] Do not render empty string children ('') in React plugin (#14470)Fixes
[expect]ShowAggregateErrorto display (#15346)[*]Replaceexitwithexit-x(#15399)[babel-plugin-jest-hoist]Usedenylistinstead of the deprecatedblacklistfor Babel 8 support (#14109)[babel-plugin-jest-hoist]Do not rely on buggy Babel behaviour (#15415)[expect]Check error instance type fortoThrow/toThrowError(#14576)[expect]Improve diff for failingexpect.objectContaining(#15038)[expect]UseArray.isArrayto check if an array is anArray(#15101)[expect]Fix Errorcauseassertion errors (#15339)[jest-changed-files]Print underlying errors when VCS commands fail (#15052)[jest-changed-files]Abortsl rootcall if output resembles a steam locomotive (#15053)[jest-circus][BREAKING] Prevent false test failures caused by promise rejections handled asynchronously (#14315)[jest-circus]Replace recursivemakeTestResultsimplementation with iterative one (#14760)[jest-circus]Omitexpect.hasAssertions()errors if a test already has errors (#14866)[jest-circus, jest-expect, jest-snapshot]Passtest.failingtests 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 respectrunInBandoption (#14578)[jest-config]SupporttestTimeoutin project config (#14697)[jest-config]SupportcoverageReportersin project config (#14697)[jest-config]Allowreportersin project config (#14768)[jest-config]Allow Node16/NodeNext/BundlermoduleResolutionin project's tsconfig (#14739)[@jest/create-cache-key-function]Correct the return type ofcreateCacheKey(#15159)[jest-each]Allow$keypathtemplates withnullorundefinedvalues (#14831)[@jest/expect-utils]Fix comparison ofDataView(#14408)[@jest/expect-utils][BREAKING] exclude non-enumerable in object matching (#14670)[@jest/expect-utils]Fix comparison ofURL(#14672)[@jest/expect-utils]CheckSymbolproperties 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 multiplehasteImplModulePaths (#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_importCoreModelso required core module is consistent if modified while loading (#15077)[jest-schemas, jest-types][BREAKING] Fix type oftestFailureExitCodeconfig option(#15232)[jest-util]Make sureisInteractiveworks in a browser (#14552)[pretty-format][BREAKING] PrintArrayBufferandDataViewcorrectly (#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
testPathPatternconfiguration option totestPathPatterns, which now takes a list of patterns instead of the regex.- [BREAKING]
--testPathPatternis now--testPathPatterns- [BREAKING] Specifying
testPathPatternswhen programmatically callingwatchmust be specified asnew TestPathPatterns(patterns), whereTestPathPatternscan be imported from@jest/pattern[jest-reporters, jest-runner]Unhandled errors without stack get correctly logged to console (#14619)[jest-util]Always loadmjsfiles withimport(#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 whereObjectContainingmatched non-object values. ([#15463])(#15463).
- Adds a
conditional/checkto ensure the argument passed toexpectis an object.- Add unit tests for new
ObjectContainingbehavior.- Remove
invalid/wrongtest case assertions forObjectContaining.[jest-worker]Addresses incorrect state on exit (#15610)Performance
[*][BREAKING] Bundle all of Jest's modules intoindex.js(#12348, #14550 & #14661)[jest-haste-map]Only spawn one process to check forwatchmaninstallation (#14826)[jest-runner]Better cleanupsource-map-supportafter test to resolve (minor) memory leak (#15233)[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(#15325CVE-2024-37890)[*]Increase version ofmicromatchto^4.0.7(#15082)[*][BREAKING] Drop support for Node.js versions 14, 16, 19, 21 and 23 (#14460, #15118, #15623, #15640)[*][BREAKING] Drop support fortypescript@4.3, minimum version is now5.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 toglob@10(#14509)[*]UseTypeErroroverErrorwhere appropriate (#14799)[docs]Fix typos inCHANGELOG.mdandpackages/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/coreto^7.11(#14109)[babel-jest, @jest/transform]Updatebabel-plugin-istanbulto v6 (#15156)[babel-plugin-jest-hoist]Move unnecessarydependenciestodevDependencies(#15010)[expect][BREAKING] Remove.toBeCalled(),.toBeCalledTimes(),.toBeCalledWith(),.lastCalledWith(),.nthCalledWith(),.toReturn(),.toReturnTimes(),.toReturnWith(),.lastReturnedWith(),.nthReturnedWith()and.toThrowError()matcher aliases (#14632)[jest-cli, jest-config, @jest/types][BREAKING] Remove deprecated--initargument (#14490)[jest-config, @jest/core, jest-util]Upgradeci-info(#14655)[jest-mock][BREAKING] RemoveMockFunctionMetadataType,MockFunctionMetadataandSpyInstancetypes (#14621)[@jest/reporters]Upgradeistanbul-lib-source-maps(#14924)[jest-schemas]Upgrade@sinclair/typebox(#14775)[jest-transform]Upgradewrite-file-atomic(#14274)[jest-util]Upgradepicomatchto v4 (#14653 & #14885)[docs] Append to NODE_OPTIONS, not overwrite ([#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)See the CHANGELOG.
Does any of this look wrong? Please let us know.
Commits
See the full diff on Github. The new version differs by more commits than we can show here.
↗️ jest-docblock (indirect, 29.7.0 → 30.2.0) · Repo · Changelog
Release Notes
30.2.0
Chore & Maintenance
[*]Update example repo for testing React Native projects (#15832)[*]Updatejest-watch-typeaheadto v3 (#15830)Features
[jest-environment-jsdom-abstract]Add support for JSDOM v27 (#15834)Fixes
30.0.1
What's Changed
Features
[jest-resolver]Implement thedefaultAsyncResolver(#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 deprecatejest-replpackage (#15673)[jest-resolver]Replace customisBuiltinModulewith node'sisBuiltin(#15685)New Contributors
Full Changelog: https://github.com/jestjs/jest/blob/main/CHANGELOG.md
30.0.0
Today we are happy to announce the release of Jest 30. This release features a substantial number of changes, fixes, and improvements. While it is one of the largest major releases of Jest ever, we admit that three years for a major release is too long. In the future, we are aiming to make more frequent major releases to keep Jest great for the next decade.
If you want to skip all the news and just get going, run
npm install jest@^30.0.0and follow the migration guide: Upgrading from Jest 29 to 30.Features
[*]RenamedglobalsCleanupModetoglobalsCleanupand--waitNextEventLoopTurnForUnhandledRejectionEventsto--waitForUnhandledRejections[expect]AddArrayOfasymmetric matcher for validating array elements. (#15567)[babel-jest]Add optionexcludeJestPresetto allow opting out ofbabel-preset-jest(#15164)[expect]Revert #15038 to fixexpect(fn).toHaveBeenCalledWith(expect.objectContaining(...))when there are multiple calls (#15508)[jest-circus, jest-cli, jest-config]AddwaitNextEventLoopTurnForUnhandledRejectionEventsflag to minimise performance impact of correct detection of unhandled promise rejections introduced in #14315 (#14681)[jest-circus]Add awaitBeforeRetryoption tojest.retryTimes(#14738)[jest-circus]Add aretryImmediatelyoption tojest.retryTimes(#14696)[jest-circus, jest-jasmine2]AllowsetupFilesAfterEnvto export an async function (#10962)[jest-circus, jest-test-result]AddstartedAttimestamp inTestCaseResultObjectwithinonTestCaseResult(#15145)[jest-cli]ExportbuildArgv(#15310)[jest-config][BREAKING] Addmtsandctsto defaultmoduleFileExtensionsconfig (#14369)[jest-config][BREAKING] UpdatetestMatchandtestRegexdefault option for supportingmjs,cjs,mts, andcts(#14584)[jest-config]Loads config file from provided path inpackage.json(#14044)[jest-config]Allow loadingjest.config.ctsfiles (#14070)[jest-config]ShowrootDirin error message when apresetfails to load (#15194)[jest-config]Support loading TS config files usingesbuild-registervia 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]AddperfStatsto surface test setup overhead (#14622)[@jest/core][BREAKING] Changed--filterto accept an object with shape{ filtered: Array<string> }to match documentation (#13319)[@jest/core]Support--outputFileoption for--listTests(#14980)[@jest/core]Stringify Errors properly with--jsonflag (#15329)[@jest/core, @jest/test-sequencer][BREAKING] ExposesglobalConfig&contextstoTestSequencer(#14535, & #14543)[jest-each]Introduce%$option to add number of the test to its title (#14710)[@jest/environment][BREAKING] Remove deprecatedjest.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 thejsdomenvironment, allowing usage of custom versions of JSDOM (#14717)[jest-environment-node]Update jest environment with dispose symbolsSymbol(#14888 & #14909)[expect, @jest/expect][BREAKING] Add type inference for function parameters inCalledWithassertions (#15129)[@jest/expect-utils]Properly compare all types ofTypedArrays (#15178)[@jest/fake-timers][BREAKING] Upgrade@sinonjs/fake-timersto v13 (#14544 & #15470)[@jest/fake-timers]Exposing new modern timers functionadvanceTimersToFrame()which advances all timers by the needed milliseconds to execute callbacks currently scheduled withrequestAnimationFrame(#14598)[jest-matcher-utils]AddSERIALIZABLE_PROPERTIESto allow custom serialization of objects (#14893)[jest-mock]Add support for the Explicit Resource Management proposal to use theusingkeyword withjest.spyOn(object, methodName)(#14895)[jest-reporters]Add support for DEC mode 2026 (#15008)[jest-resolver]Supportfile://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 functionjest.advanceTimersToFrame()from@jest/fake-timers(#14598)[jest-runtime]Supportimport.meta.filenameandimport.meta.dirname(available from Node 20.11) (#14854)[jest-runtime]Supportimport.meta.resolve(#14930)[jest-runtime][BREAKING] Make it mandatory to passglobalConfigto theRuntimeconstructor (#15044)[jest-runtime]Addunstable_unmockModule(#15080)[jest-runtime]AddonGenerateMocktransformer callback for auto generated callbacks (#15433 & #15482)[jest-runtime][BREAKING] Usevm.compileFunctionovervm.Script(#15461)[@jest/schemas]Upgrade@sinclair/typeboxto v0.34 (#15450)[@jest/types]test.each(): Accept a readonly (as const) table properly (#14565)[@jest/types]Improve argument type inference passed totestanddescribecallback functions fromeachtables (#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 fromjest-snapshotinto its own package (#15095)[pretty-format][BREAKING] Do not render empty string children ('') in React plugin (#14470)Fixes
[expect]ShowAggregateErrorto display (#15346)[*]Replaceexitwithexit-x(#15399)[babel-plugin-jest-hoist]Usedenylistinstead of the deprecatedblacklistfor Babel 8 support (#14109)[babel-plugin-jest-hoist]Do not rely on buggy Babel behaviour (#15415)[expect]Check error instance type fortoThrow/toThrowError(#14576)[expect]Improve diff for failingexpect.objectContaining(#15038)[expect]UseArray.isArrayto check if an array is anArray(#15101)[expect]Fix Errorcauseassertion errors (#15339)[jest-changed-files]Print underlying errors when VCS commands fail (#15052)[jest-changed-files]Abortsl rootcall if output resembles a steam locomotive (#15053)[jest-circus][BREAKING] Prevent false test failures caused by promise rejections handled asynchronously (#14315)[jest-circus]Replace recursivemakeTestResultsimplementation with iterative one (#14760)[jest-circus]Omitexpect.hasAssertions()errors if a test already has errors (#14866)[jest-circus, jest-expect, jest-snapshot]Passtest.failingtests 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 respectrunInBandoption (#14578)[jest-config]SupporttestTimeoutin project config (#14697)[jest-config]SupportcoverageReportersin project config (#14697)[jest-config]Allowreportersin project config (#14768)[jest-config]Allow Node16/NodeNext/BundlermoduleResolutionin project's tsconfig (#14739)[@jest/create-cache-key-function]Correct the return type ofcreateCacheKey(#15159)[jest-each]Allow$keypathtemplates withnullorundefinedvalues (#14831)[@jest/expect-utils]Fix comparison ofDataView(#14408)[@jest/expect-utils][BREAKING] exclude non-enumerable in object matching (#14670)[@jest/expect-utils]Fix comparison ofURL(#14672)[@jest/expect-utils]CheckSymbolproperties 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 multiplehasteImplModulePaths (#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_importCoreModelso required core module is consistent if modified while loading (#15077)[jest-schemas, jest-types][BREAKING] Fix type oftestFailureExitCodeconfig option(#15232)[jest-util]Make sureisInteractiveworks in a browser (#14552)[pretty-format][BREAKING] PrintArrayBufferandDataViewcorrectly (#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
testPathPatternconfiguration option totestPathPatterns, which now takes a list of patterns instead of the regex.- [BREAKING]
--testPathPatternis now--testPathPatterns- [BREAKING] Specifying
testPathPatternswhen programmatically callingwatchmust be specified asnew TestPathPatterns(patterns), whereTestPathPatternscan be imported from@jest/pattern[jest-reporters, jest-runner]Unhandled errors without stack get correctly logged to console (#14619)[jest-util]Always loadmjsfiles withimport(#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 whereObjectContainingmatched non-object values. ([#15463])(#15463).
- Adds a
conditional/checkto ensure the argument passed toexpectis an object.- Add unit tests for new
ObjectContainingbehavior.- Remove
invalid/wrongtest case assertions forObjectContaining.[jest-worker]Addresses incorrect state on exit (#15610)Performance
[*][BREAKING] Bundle all of Jest's modules intoindex.js(#12348, #14550 & #14661)[jest-haste-map]Only spawn one process to check forwatchmaninstallation (#14826)[jest-runner]Better cleanupsource-map-supportafter test to resolve (minor) memory leak (#15233)[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(#15325CVE-2024-37890)[*]Increase version ofmicromatchto^4.0.7(#15082)[*][BREAKING] Drop support for Node.js versions 14, 16, 19, 21 and 23 (#14460, #15118, #15623, #15640)[*][BREAKING] Drop support fortypescript@4.3, minimum version is now5.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 toglob@10(#14509)[*]UseTypeErroroverErrorwhere appropriate (#14799)[docs]Fix typos inCHANGELOG.mdandpackages/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/coreto^7.11(#14109)[babel-jest, @jest/transform]Updatebabel-plugin-istanbulto v6 (#15156)[babel-plugin-jest-hoist]Move unnecessarydependenciestodevDependencies(#15010)[expect][BREAKING] Remove.toBeCalled(),.toBeCalledTimes(),.toBeCalledWith(),.lastCalledWith(),.nthCalledWith(),.toReturn(),.toReturnTimes(),.toReturnWith(),.lastReturnedWith(),.nthReturnedWith()and.toThrowError()matcher aliases (#14632)[jest-cli, jest-config, @jest/types][BREAKING] Remove deprecated--initargument (#14490)[jest-config, @jest/core, jest-util]Upgradeci-info(#14655)[jest-mock][BREAKING] RemoveMockFunctionMetadataType,MockFunctionMetadataandSpyInstancetypes (#14621)[@jest/reporters]Upgradeistanbul-lib-source-maps(#14924)[jest-schemas]Upgrade@sinclair/typebox(#14775)[jest-transform]Upgradewrite-file-atomic(#14274)[jest-util]Upgradepicomatchto v4 (#14653 & #14885)[docs] Append to NODE_OPTIONS, not overwrite ([#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)See the CHANGELOG.
Does any of this look wrong? Please let us know.
Commits
See the full diff on Github. The new version differs by more commits than we can show here.
↗️ jest-each (indirect, 29.7.0 → 30.2.0) · Repo · Changelog
Release Notes
30.2.0
Chore & Maintenance
[*]Update example repo for testing React Native projects (#15832)[*]Updatejest-watch-typeaheadto v3 (#15830)Features
[jest-environment-jsdom-abstract]Add support for JSDOM v27 (#15834)Fixes
30.1.0
Features
[jest-leak-detector]Configurable GC aggressiveness regarding to V8 heap snapshot generation (#15793)[jest-runtime]Reduce redundant ReferenceError messages[jest-core]Include test modules that failed to load when --onlyFailures is activeFixes
- `[jest-snapshot-utils] Fix deprecated goo.gl snapshot guide link not getting replaced with fully canonical URL (#15787)
[jest-circus]Fixit.concurrentnot working withdescribe.skip(#15765)[jest-snapshot]Fix mangled inline snapshot updates when used with Prettier 3 and CRLF line endings[jest-runtime]Importing from@jest/globalsin more than one file no longer breaks relative paths (#15772)Chore
[expect]Update docblock fortoContain()to display info on substring check (#15789)
30.0.5 (from changelog)
Features
[jest-config]AllowtestMatchto take a string value[jest-worker]LetworkerIdleMemoryLimitaccept 0 to always restart worker child processesFixes
[expect]Fixbiginterror (#15702)
30.0.2
What's Changed
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)Full Changelog: https://github.com/jestjs/jest/blob/main/CHANGELOG.md
30.0.1
What's Changed
Features
[jest-resolver]Implement thedefaultAsyncResolver(#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 deprecatejest-replpackage (#15673)[jest-resolver]Replace customisBuiltinModulewith node'sisBuiltin(#15685)New Contributors
Full Changelog: https://github.com/jestjs/jest/blob/main/CHANGELOG.md
30.0.0
Today we are happy to announce the release of Jest 30. This release features a substantial number of changes, fixes, and improvements. While it is one of the largest major releases of Jest ever, we admit that three years for a major release is too long. In the future, we are aiming to make more frequent major releases to keep Jest great for the next decade.
If you want to skip all the news and just get going, run
npm install jest@^30.0.0and follow the migration guide: Upgrading from Jest 29 to 30.Features
[*]RenamedglobalsCleanupModetoglobalsCleanupand--waitNextEventLoopTurnForUnhandledRejectionEventsto--waitForUnhandledRejections[expect]AddArrayOfasymmetric matcher for validating array elements. (#15567)[babel-jest]Add optionexcludeJestPresetto allow opting out ofbabel-preset-jest(#15164)[expect]Revert #15038 to fixexpect(fn).toHaveBeenCalledWith(expect.objectContaining(...))when there are multiple calls (#15508)[jest-circus, jest-cli, jest-config]AddwaitNextEventLoopTurnForUnhandledRejectionEventsflag to minimise performance impact of correct detection of unhandled promise rejections introduced in #14315 (#14681)[jest-circus]Add awaitBeforeRetryoption tojest.retryTimes(#14738)[jest-circus]Add aretryImmediatelyoption tojest.retryTimes(#14696)[jest-circus, jest-jasmine2]AllowsetupFilesAfterEnvto export an async function (#10962)[jest-circus, jest-test-result]AddstartedAttimestamp inTestCaseResultObjectwithinonTestCaseResult(#15145)[jest-cli]ExportbuildArgv(#15310)[jest-config][BREAKING] Addmtsandctsto defaultmoduleFileExtensionsconfig (#14369)[jest-config][BREAKING] UpdatetestMatchandtestRegexdefault option for supportingmjs,cjs,mts, andcts(#14584)[jest-config]Loads config file from provided path inpackage.json(#14044)[jest-config]Allow loadingjest.config.ctsfiles (#14070)[jest-config]ShowrootDirin error message when apresetfails to load (#15194)[jest-config]Support loading TS config files usingesbuild-registervia 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]AddperfStatsto surface test setup overhead (#14622)[@jest/core][BREAKING] Changed--filterto accept an object with shape{ filtered: Array<string> }to match documentation (#13319)[@jest/core]Support--outputFileoption for--listTests(#14980)[@jest/core]Stringify Errors properly with--jsonflag (#15329)[@jest/core, @jest/test-sequencer][BREAKING] ExposesglobalConfig&contextstoTestSequencer(#14535, & #14543)[jest-each]Introduce%$option to add number of the test to its title (#14710)[@jest/environment][BREAKING] Remove deprecatedjest.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 thejsdomenvironment, allowing usage of custom versions of JSDOM (#14717)[jest-environment-node]Update jest environment with dispose symbolsSymbol(#14888 & #14909)[expect, @jest/expect][BREAKING] Add type inference for function parameters inCalledWithassertions (#15129)[@jest/expect-utils]Properly compare all types ofTypedArrays (#15178)[@jest/fake-timers][BREAKING] Upgrade@sinonjs/fake-timersto v13 (#14544 & #15470)[@jest/fake-timers]Exposing new modern timers functionadvanceTimersToFrame()which advances all timers by the needed milliseconds to execute callbacks currently scheduled withrequestAnimationFrame(#14598)[jest-matcher-utils]AddSERIALIZABLE_PROPERTIESto allow custom serialization of objects (#14893)[jest-mock]Add support for the Explicit Resource Management proposal to use theusingkeyword withjest.spyOn(object, methodName)(#14895)[jest-reporters]Add support for DEC mode 2026 (#15008)[jest-resolver]Supportfile://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 functionjest.advanceTimersToFrame()from@jest/fake-timers(#14598)[jest-runtime]Supportimport.meta.filenameandimport.meta.dirname(available from Node 20.11) (#14854)[jest-runtime]Supportimport.meta.resolve(#14930)[jest-runtime][BREAKING] Make it mandatory to passglobalConfigto theRuntimeconstructor (#15044)[jest-runtime]Addunstable_unmockModule(#15080)[jest-runtime]AddonGenerateMocktransformer callback for auto generated callbacks (#15433 & #15482)[jest-runtime][BREAKING] Usevm.compileFunctionovervm.Script(#15461)[@jest/schemas]Upgrade@sinclair/typeboxto v0.34 (#15450)[@jest/types]test.each(): Accept a readonly (as const) table properly (#14565)[@jest/types]Improve argument type inference passed totestanddescribecallback functions fromeachtables (#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 fromjest-snapshotinto its own package (#15095)[pretty-format][BREAKING] Do not render empty string children ('') in React plugin (#14470)Fixes
[expect]ShowAggregateErrorto display (#15346)[*]Replaceexitwithexit-x(#15399)[babel-plugin-jest-hoist]Usedenylistinstead of the deprecatedblacklistfor Babel 8 support (#14109)[babel-plugin-jest-hoist]Do not rely on buggy Babel behaviour (#15415)[expect]Check error instance type fortoThrow/toThrowError(#14576)[expect]Improve diff for failingexpect.objectContaining(#15038)[expect]UseArray.isArrayto check if an array is anArray(#15101)[expect]Fix Errorcauseassertion errors (#15339)[jest-changed-files]Print underlying errors when VCS commands fail (#15052)[jest-changed-files]Abortsl rootcall if output resembles a steam locomotive (#15053)[jest-circus][BREAKING] Prevent false test failures caused by promise rejections handled asynchronously (#14315)[jest-circus]Replace recursivemakeTestResultsimplementation with iterative one (#14760)[jest-circus]Omitexpect.hasAssertions()errors if a test already has errors (#14866)[jest-circus, jest-expect, jest-snapshot]Passtest.failingtests 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 respectrunInBandoption (#14578)[jest-config]SupporttestTimeoutin project config (#14697)[jest-config]SupportcoverageReportersin project config (#14697)[jest-config]Allowreportersin project config (#14768)[jest-config]Allow Node16/NodeNext/BundlermoduleResolutionin project's tsconfig (#14739)[@jest/create-cache-key-function]Correct the return type ofcreateCacheKey(#15159)[jest-each]Allow$keypathtemplates withnullorundefinedvalues (#14831)[@jest/expect-utils]Fix comparison ofDataView(#14408)[@jest/expect-utils][BREAKING] exclude non-enumerable in object matching (#14670)[@jest/expect-utils]Fix comparison ofURL(#14672)[@jest/expect-utils]CheckSymbolproperties 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 multiplehasteImplModulePaths (#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_importCoreModelso required core module is consistent if modified while loading (#15077)[jest-schemas, jest-types][BREAKING] Fix type oftestFailureExitCodeconfig option(#15232)[jest-util]Make sureisInteractiveworks in a browser (#14552)[pretty-format][BREAKING] PrintArrayBufferandDataViewcorrectly (#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
testPathPatternconfiguration option totestPathPatterns, which now takes a list of patterns instead of the regex.- [BREAKING]
--testPathPatternis now--testPathPatterns- [BREAKING] Specifying
testPathPatternswhen programmatically callingwatchmust be specified asnew TestPathPatterns(patterns), whereTestPathPatternscan be imported from@jest/pattern[jest-reporters, jest-runner]Unhandled errors without stack get correctly logged to console (#14619)[jest-util]Always loadmjsfiles withimport(#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 whereObjectContainingmatched non-object values. ([#15463])(#15463).
- Adds a
conditional/checkto ensure the argument passed toexpectis an object.- Add unit tests for new
ObjectContainingbehavior.- Remove
invalid/wrongtest case assertions forObjectContaining.[jest-worker]Addresses incorrect state on exit (#15610)Performance
[*][BREAKING] Bundle all of Jest's modules intoindex.js(#12348, #14550 & #14661)[jest-haste-map]Only spawn one process to check forwatchmaninstallation (#14826)[jest-runner]Better cleanupsource-map-supportafter test to resolve (minor) memory leak (#15233)[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(#15325CVE-2024-37890)[*]Increase version ofmicromatchto^4.0.7(#15082)[*][BREAKING] Drop support for Node.js versions 14, 16, 19, 21 and 23 (#14460, #15118, #15623, #15640)[*][BREAKING] Drop support fortypescript@4.3, minimum version is now5.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 toglob@10(#14509)[*]UseTypeErroroverErrorwhere appropriate (#14799)[docs]Fix typos inCHANGELOG.mdandpackages/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/coreto^7.11(#14109)[babel-jest, @jest/transform]Updatebabel-plugin-istanbulto v6 (#15156)[babel-plugin-jest-hoist]Move unnecessarydependenciestodevDependencies(#15010)[expect][BREAKING] Remove.toBeCalled(),.toBeCalledTimes(),.toBeCalledWith(),.lastCalledWith(),.nthCalledWith(),.toReturn(),.toReturnTimes(),.toReturnWith(),.lastReturnedWith(),.nthReturnedWith()and.toThrowError()matcher aliases (#14632)[jest-cli, jest-config, @jest/types][BREAKING] Remove deprecated--initargument (#14490)[jest-config, @jest/core, jest-util]Upgradeci-info(#14655)[jest-mock][BREAKING] RemoveMockFunctionMetadataType,MockFunctionMetadataandSpyInstancetypes (#14621)[@jest/reporters]Upgradeistanbul-lib-source-maps(#14924)[jest-schemas]Upgrade@sinclair/typebox(#14775)[jest-transform]Upgradewrite-file-atomic(#14274)[jest-util]Upgradepicomatchto v4 (#14653 & #14885)[docs] Append to NODE_OPTIONS, not overwrite ([#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)See the CHANGELOG.
Does any of this look wrong? Please let us know.
Commits
See the full diff on Github. The new version differs by more commits than we can show here.
↗️ jest-environment-node (indirect, 29.7.0 → 30.2.0) · Repo · Changelog
Release Notes
30.2.0
Chore & Maintenance
[*]Update example repo for testing React Native projects (#15832)[*]Updatejest-watch-typeaheadto v3 (#15830)Features
[jest-environment-jsdom-abstract]Add support for JSDOM v27 (#15834)Fixes
30.1.1
Fixes
[jest-snapshot-utils]Fix deprecated goo.gl snapshot warning not handling Windows end-of-line sequences (#15800)
30.1.0
Features
[jest-leak-detector]Configurable GC aggressiveness regarding to V8 heap snapshot generation (#15793)[jest-runtime]Reduce redundant ReferenceError messages[jest-core]Include test modules that failed to load when --onlyFailures is activeFixes
- `[jest-snapshot-utils] Fix deprecated goo.gl snapshot guide link not getting replaced with fully canonical URL (#15787)
[jest-circus]Fixit.concurrentnot working withdescribe.skip(#15765)[jest-snapshot]Fix mangled inline snapshot updates when used with Prettier 3 and CRLF line endings[jest-runtime]Importing from@jest/globalsin more than one file no longer breaks relative paths (#15772)Chore
[expect]Update docblock fortoContain()to display info on substring check (#15789)
30.0.5 (from changelog)
Features
[jest-config]AllowtestMatchto take a string value[jest-worker]LetworkerIdleMemoryLimitaccept 0 to always restart worker child processesFixes
[expect]Fixbiginterror (#15702)
30.0.4 (from changelog)
Features
[expect]TheInversetype is now exported (#15714)[expect]feat: supportasync functionsintoBe(#15704)Fixes
30.0.2
What's Changed
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)Full Changelog: https://github.com/jestjs/jest/blob/main/CHANGELOG.md
30.0.1
What's Changed
Features
[jest-resolver]Implement thedefaultAsyncResolver(#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 deprecatejest-replpackage (#15673)[jest-resolver]Replace customisBuiltinModulewith node'sisBuiltin(#15685)New Contributors
Full Changelog: https://github.com/jestjs/jest/blob/main/CHANGELOG.md
30.0.0
Today we are happy to announce the release of Jest 30. This release features a substantial number of changes, fixes, and improvements. While it is one of the largest major releases of Jest ever, we admit that three years for a major release is too long. In the future, we are aiming to make more frequent major releases to keep Jest great for the next decade.
If you want to skip all the news and just get going, run
npm install jest@^30.0.0and follow the migration guide: Upgrading from Jest 29 to 30.Features
[*]RenamedglobalsCleanupModetoglobalsCleanupand--waitNextEventLoopTurnForUnhandledRejectionEventsto--waitForUnhandledRejections[expect]AddArrayOfasymmetric matcher for validating array elements. (#15567)[babel-jest]Add optionexcludeJestPresetto allow opting out ofbabel-preset-jest(#15164)[expect]Revert #15038 to fixexpect(fn).toHaveBeenCalledWith(expect.objectContaining(...))when there are multiple calls (#15508)[jest-circus, jest-cli, jest-config]AddwaitNextEventLoopTurnForUnhandledRejectionEventsflag to minimise performance impact of correct detection of unhandled promise rejections introduced in #14315 (#14681)[jest-circus]Add awaitBeforeRetryoption tojest.retryTimes(#14738)[jest-circus]Add aretryImmediatelyoption tojest.retryTimes(#14696)[jest-circus, jest-jasmine2]AllowsetupFilesAfterEnvto export an async function (#10962)[jest-circus, jest-test-result]AddstartedAttimestamp inTestCaseResultObjectwithinonTestCaseResult(#15145)[jest-cli]ExportbuildArgv(#15310)[jest-config][BREAKING] Addmtsandctsto defaultmoduleFileExtensionsconfig (#14369)[jest-config][BREAKING] UpdatetestMatchandtestRegexdefault option for supportingmjs,cjs,mts, andcts(#14584)[jest-config]Loads config file from provided path inpackage.json(#14044)[jest-config]Allow loadingjest.config.ctsfiles (#14070)[jest-config]ShowrootDirin error message when apresetfails to load (#15194)[jest-config]Support loading TS config files usingesbuild-registervia 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]AddperfStatsto surface test setup overhead (#14622)[@jest/core][BREAKING] Changed--filterto accept an object with shape{ filtered: Array<string> }to match documentation (#13319)[@jest/core]Support--outputFileoption for--listTests(#14980)[@jest/core]Stringify Errors properly with--jsonflag (#15329)[@jest/core, @jest/test-sequencer][BREAKING] ExposesglobalConfig&contextstoTestSequencer(#14535, & #14543)[jest-each]Introduce%$option to add number of the test to its title (#14710)[@jest/environment][BREAKING] Remove deprecatedjest.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 thejsdomenvironment, allowing usage of custom versions of JSDOM (#14717)[jest-environment-node]Update jest environment with dispose symbolsSymbol(#14888 & #14909)[expect, @jest/expect][BREAKING] Add type inference for function parameters inCalledWithassertions (#15129)[@jest/expect-utils]Properly compare all types ofTypedArrays (#15178)[@jest/fake-timers][BREAKING] Upgrade@sinonjs/fake-timersto v13 (#14544 & #15470)[@jest/fake-timers]Exposing new modern timers functionadvanceTimersToFrame()which advances all timers by the needed milliseconds to execute callbacks currently scheduled withrequestAnimationFrame(#14598)[jest-matcher-utils]AddSERIALIZABLE_PROPERTIESto allow custom serialization of objects (#14893)[jest-mock]Add support for the Explicit Resource Management proposal to use theusingkeyword withjest.spyOn(object, methodName)(#14895)[jest-reporters]Add support for DEC mode 2026 (#15008)[jest-resolver]Supportfile://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 functionjest.advanceTimersToFrame()from@jest/fake-timers(#14598)[jest-runtime]Supportimport.meta.filenameandimport.meta.dirname(available from Node 20.11) (#14854)[jest-runtime]Supportimport.meta.resolve(#14930)[jest-runtime][BREAKING] Make it mandatory to passglobalConfigto theRuntimeconstructor (#15044)[jest-runtime]Addunstable_unmockModule(#15080)[jest-runtime]AddonGenerateMocktransformer callback for auto generated callbacks (#15433 & #15482)[jest-runtime][BREAKING] Usevm.compileFunctionovervm.Script(#15461)[@jest/schemas]Upgrade@sinclair/typeboxto v0.34 (#15450)[@jest/types]test.each(): Accept a readonly (as const) table properly (#14565)[@jest/types]Improve argument type inference passed totestanddescribecallback functions fromeachtables (#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 fromjest-snapshotinto its own package (#15095)[pretty-format][BREAKING] Do not render empty string children ('') in React plugin (#14470)Fixes
[expect]ShowAggregateErrorto display (#15346)[*]Replaceexitwithexit-x(#15399)[babel-plugin-jest-hoist]Usedenylistinstead of the deprecatedblacklistfor Babel 8 support (#14109)[babel-plugin-jest-hoist]Do not rely on buggy Babel behaviour (#15415)[expect]Check error instance type fortoThrow/toThrowError(#14576)[expect]Improve diff for failingexpect.objectContaining(#15038)[expect]UseArray.isArrayto check if an array is anArray(#15101)[expect]Fix Errorcauseassertion errors (#15339)[jest-changed-files]Print underlying errors when VCS commands fail (#15052)[jest-changed-files]Abortsl rootcall if output resembles a steam locomotive (#15053)[jest-circus][BREAKING] Prevent false test failures caused by promise rejections handled asynchronously (#14315)[jest-circus]Replace recursivemakeTestResultsimplementation with iterative one (#14760)[jest-circus]Omitexpect.hasAssertions()errors if a test already has errors (#14866)[jest-circus, jest-expect, jest-snapshot]Passtest.failingtests 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 respectrunInBandoption (#14578)[jest-config]SupporttestTimeoutin project config (#14697)[jest-config]SupportcoverageReportersin project config (#14697)[jest-config]Allowreportersin project config (#14768)[jest-config]Allow Node16/NodeNext/BundlermoduleResolutionin project's tsconfig (#14739)[@jest/create-cache-key-function]Correct the return type ofcreateCacheKey(#15159)[jest-each]Allow$keypathtemplates withnullorundefinedvalues (#14831)[@jest/expect-utils]Fix comparison ofDataView(#14408)[@jest/expect-utils][BREAKING] exclude non-enumerable in object matching (#14670)[@jest/expect-utils]Fix comparison ofURL(#14672)[@jest/expect-utils]CheckSymbolproperties 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 multiplehasteImplModulePaths (#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_importCoreModelso required core module is consistent if modified while loading (#15077)[jest-schemas, jest-types][BREAKING] Fix type oftestFailureExitCodeconfig option(#15232)[jest-util]Make sureisInteractiveworks in a browser (#14552)[pretty-format][BREAKING] PrintArrayBufferandDataViewcorrectly (#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
testPathPatternconfiguration option totestPathPatterns, which now takes a list of patterns instead of the regex.- [BREAKING]
--testPathPatternis now--testPathPatterns- [BREAKING] Specifying
testPathPatternswhen programmatically callingwatchmust be specified asnew TestPathPatterns(patterns), whereTestPathPatternscan be imported from@jest/pattern[jest-reporters, jest-runner]Unhandled errors without stack get correctly logged to console (#14619)[jest-util]Always loadmjsfiles withimport(#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 whereObjectContainingmatched non-object values. ([#15463])(#15463).
- Adds a
conditional/checkto ensure the argument passed toexpectis an object.- Add unit tests for new
ObjectContainingbehavior.- Remove
invalid/wrongtest case assertions forObjectContaining.[jest-worker]Addresses incorrect state on exit (#15610)Performance
[*][BREAKING] Bundle all of Jest's modules intoindex.js(#12348, #14550 & #14661)[jest-haste-map]Only spawn one process to check forwatchmaninstallation (#14826)[jest-runner]Better cleanupsource-map-supportafter test to resolve (minor) memory leak (#15233)[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(#15325CVE-2024-37890)[*]Increase version ofmicromatchto^4.0.7(#15082)[*][BREAKING] Drop support for Node.js versions 14, 16, 19, 21 and 23 (#14460, #15118, #15623, #15640)[*][BREAKING] Drop support fortypescript@4.3, minimum version is now5.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 toglob@10(#14509)[*]UseTypeErroroverErrorwhere appropriate (#14799)[docs]Fix typos inCHANGELOG.mdandpackages/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/coreto^7.11(#14109)[babel-jest, @jest/transform]Updatebabel-plugin-istanbulto v6 (#15156)[babel-plugin-jest-hoist]Move unnecessarydependenciestodevDependencies(#15010)[expect][BREAKING] Remove.toBeCalled(),.toBeCalledTimes(),.toBeCalledWith(),.lastCalledWith(),.nthCalledWith(),.toReturn(),.toReturnTimes(),.toReturnWith(),.lastReturnedWith(),.nthReturnedWith()and.toThrowError()matcher aliases (#14632)[jest-cli, jest-config, @jest/types][BREAKING] Remove deprecated--initargument (#14490)[jest-config, @jest/core, jest-util]Upgradeci-info(#14655)[jest-mock][BREAKING] RemoveMockFunctionMetadataType,MockFunctionMetadataandSpyInstancetypes (#14621)[@jest/reporters]Upgradeistanbul-lib-source-maps(#14924)[jest-schemas]Upgrade@sinclair/typebox(#14775)[jest-transform]Upgradewrite-file-atomic(#14274)[jest-util]Upgradepicomatchto v4 (#14653 & #14885)[docs] Append to NODE_OPTIONS, not overwrite ([#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)See the CHANGELOG.
Does any of this look wrong? Please let us know.
Commits
See the full diff on Github. The new version differs by more commits than we can show here.
↗️ jest-haste-map (indirect, 29.7.0 → 30.2.0) · Repo · Changelog
Release Notes
30.2.0
Chore & Maintenance
[*]Update example repo for testing React Native projects (#15832)[*]Updatejest-watch-typeaheadto v3 (#15830)Features
[jest-environment-jsdom-abstract]Add support for JSDOM v27 (#15834)Fixes
30.1.0
Features
[jest-leak-detector]Configurable GC aggressiveness regarding to V8 heap snapshot generation (#15793)[jest-runtime]Reduce redundant ReferenceError messages[jest-core]Include test modules that failed to load when --onlyFailures is activeFixes
- `[jest-snapshot-utils] Fix deprecated goo.gl snapshot guide link not getting replaced with fully canonical URL (#15787)
[jest-circus]Fixit.concurrentnot working withdescribe.skip(#15765)[jest-snapshot]Fix mangled inline snapshot updates when used with Prettier 3 and CRLF line endings[jest-runtime]Importing from@jest/globalsin more than one file no longer breaks relative paths (#15772)Chore
[expect]Update docblock fortoContain()to display info on substring check (#15789)
30.0.5 (from changelog)
Features
[jest-config]AllowtestMatchto take a string value[jest-worker]LetworkerIdleMemoryLimitaccept 0 to always restart worker child processesFixes
[expect]Fixbiginterror (#15702)
30.0.2
What's Changed
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)Full Changelog: https://github.com/jestjs/jest/blob/main/CHANGELOG.md
30.0.1
What's Changed
Features
[jest-resolver]Implement thedefaultAsyncResolver(#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 deprecatejest-replpackage (#15673)[jest-resolver]Replace customisBuiltinModulewith node'sisBuiltin(#15685)New Contributors
Full Changelog: https://github.com/jestjs/jest/blob/main/CHANGELOG.md
30.0.0
Today we are happy to announce the release of Jest 30. This release features a substantial number of changes, fixes, and improvements. While it is one of the largest major releases of Jest ever, we admit that three years for a major release is too long. In the future, we are aiming to make more frequent major releases to keep Jest great for the next decade.
If you want to skip all the news and just get going, run
npm install jest@^30.0.0and follow the migration guide: Upgrading from Jest 29 to 30.Features
[*]RenamedglobalsCleanupModetoglobalsCleanupand--waitNextEventLoopTurnForUnhandledRejectionEventsto--waitForUnhandledRejections[expect]AddArrayOfasymmetric matcher for validating array elements. (#15567)[babel-jest]Add optionexcludeJestPresetto allow opting out ofbabel-preset-jest(#15164)[expect]Revert #15038 to fixexpect(fn).toHaveBeenCalledWith(expect.objectContaining(...))when there are multiple calls (#15508)[jest-circus, jest-cli, jest-config]AddwaitNextEventLoopTurnForUnhandledRejectionEventsflag to minimise performance impact of correct detection of unhandled promise rejections introduced in #14315 (#14681)[jest-circus]Add awaitBeforeRetryoption tojest.retryTimes(#14738)[jest-circus]Add aretryImmediatelyoption tojest.retryTimes(#14696)[jest-circus, jest-jasmine2]AllowsetupFilesAfterEnvto export an async function (#10962)[jest-circus, jest-test-result]AddstartedAttimestamp inTestCaseResultObjectwithinonTestCaseResult(#15145)[jest-cli]ExportbuildArgv(#15310)[jest-config][BREAKING] Addmtsandctsto defaultmoduleFileExtensionsconfig (#14369)[jest-config][BREAKING] UpdatetestMatchandtestRegexdefault option for supportingmjs,cjs,mts, andcts(#14584)[jest-config]Loads config file from provided path inpackage.json(#14044)[jest-config]Allow loadingjest.config.ctsfiles (#14070)[jest-config]ShowrootDirin error message when apresetfails to load (#15194)[jest-config]Support loading TS config files usingesbuild-registervia 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]AddperfStatsto surface test setup overhead (#14622)[@jest/core][BREAKING] Changed--filterto accept an object with shape{ filtered: Array<string> }to match documentation (#13319)[@jest/core]Support--outputFileoption for--listTests(#14980)[@jest/core]Stringify Errors properly with--jsonflag (#15329)[@jest/core, @jest/test-sequencer][BREAKING] ExposesglobalConfig&contextstoTestSequencer(#14535, & #14543)[jest-each]Introduce%$option to add number of the test to its title (#14710)[@jest/environment][BREAKING] Remove deprecatedjest.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 thejsdomenvironment, allowing usage of custom versions of JSDOM (#14717)[jest-environment-node]Update jest environment with dispose symbolsSymbol(#14888 & #14909)[expect, @jest/expect][BREAKING] Add type inference for function parameters inCalledWithassertions (#15129)[@jest/expect-utils]Properly compare all types ofTypedArrays (#15178)[@jest/fake-timers][BREAKING] Upgrade@sinonjs/fake-timersto v13 (#14544 & #15470)[@jest/fake-timers]Exposing new modern timers functionadvanceTimersToFrame()which advances all timers by the needed milliseconds to execute callbacks currently scheduled withrequestAnimationFrame(#14598)[jest-matcher-utils]AddSERIALIZABLE_PROPERTIESto allow custom serialization of objects (#14893)[jest-mock]Add support for the Explicit Resource Management proposal to use theusingkeyword withjest.spyOn(object, methodName)(#14895)[jest-reporters]Add support for DEC mode 2026 (#15008)[jest-resolver]Supportfile://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 functionjest.advanceTimersToFrame()from@jest/fake-timers(#14598)[jest-runtime]Supportimport.meta.filenameandimport.meta.dirname(available from Node 20.11) (#14854)[jest-runtime]Supportimport.meta.resolve(#14930)[jest-runtime][BREAKING] Make it mandatory to passglobalConfigto theRuntimeconstructor (#15044)[jest-runtime]Addunstable_unmockModule(#15080)[jest-runtime]AddonGenerateMocktransformer callback for auto generated callbacks (#15433 & #15482)[jest-runtime][BREAKING] Usevm.compileFunctionovervm.Script(#15461)[@jest/schemas]Upgrade@sinclair/typeboxto v0.34 (#15450)[@jest/types]test.each(): Accept a readonly (as const) table properly (#14565)[@jest/types]Improve argument type inference passed totestanddescribecallback functions fromeachtables (#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 fromjest-snapshotinto its own package (#15095)[pretty-format][BREAKING] Do not render empty string children ('') in React plugin (#14470)Fixes
[expect]ShowAggregateErrorto display (#15346)[*]Replaceexitwithexit-x(#15399)[babel-plugin-jest-hoist]Usedenylistinstead of the deprecatedblacklistfor Babel 8 support (#14109)[babel-plugin-jest-hoist]Do not rely on buggy Babel behaviour (#15415)[expect]Check error instance type fortoThrow/toThrowError(#14576)[expect]Improve diff for failingexpect.objectContaining(#15038)[expect]UseArray.isArrayto check if an array is anArray(#15101)[expect]Fix Errorcauseassertion errors (#15339)[jest-changed-files]Print underlying errors when VCS commands fail (#15052)[jest-changed-files]Abortsl rootcall if output resembles a steam locomotive (#15053)[jest-circus][BREAKING] Prevent false test failures caused by promise rejections handled asynchronously (#14315)[jest-circus]Replace recursivemakeTestResultsimplementation with iterative one (#14760)[jest-circus]Omitexpect.hasAssertions()errors if a test already has errors (#14866)[jest-circus, jest-expect, jest-snapshot]Passtest.failingtests 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 respectrunInBandoption (#14578)[jest-config]SupporttestTimeoutin project config (#14697)[jest-config]SupportcoverageReportersin project config (#14697)[jest-config]Allowreportersin project config (#14768)[jest-config]Allow Node16/NodeNext/BundlermoduleResolutionin project's tsconfig (#14739)[@jest/create-cache-key-function]Correct the return type ofcreateCacheKey(#15159)[jest-each]Allow$keypathtemplates withnullorundefinedvalues (#14831)[@jest/expect-utils]Fix comparison ofDataView(#14408)[@jest/expect-utils][BREAKING] exclude non-enumerable in object matching (#14670)[@jest/expect-utils]Fix comparison ofURL(#14672)[@jest/expect-utils]CheckSymbolproperties 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 multiplehasteImplModulePaths (#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_importCoreModelso required core module is consistent if modified while loading (#15077)[jest-schemas, jest-types][BREAKING] Fix type oftestFailureExitCodeconfig option(#15232)[jest-util]Make sureisInteractiveworks in a browser (#14552)[pretty-format][BREAKING] PrintArrayBufferandDataViewcorrectly (#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
testPathPatternconfiguration option totestPathPatterns, which now takes a list of patterns instead of the regex.- [BREAKING]
--testPathPatternis now--testPathPatterns- [BREAKING] Specifying
testPathPatternswhen programmatically callingwatchmust be specified asnew TestPathPatterns(patterns), whereTestPathPatternscan be imported from@jest/pattern[jest-reporters, jest-runner]Unhandled errors without stack get correctly logged to console (#14619)[jest-util]Always loadmjsfiles withimport(#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 whereObjectContainingmatched non-object values. ([#15463])(#15463).
- Adds a
conditional/checkto ensure the argument passed toexpectis an object.- Add unit tests for new
ObjectContainingbehavior.- Remove
invalid/wrongtest case assertions forObjectContaining.[jest-worker]Addresses incorrect state on exit (#15610)Performance
[*][BREAKING] Bundle all of Jest's modules intoindex.js(#12348, #14550 & #14661)[jest-haste-map]Only spawn one process to check forwatchmaninstallation (#14826)[jest-runner]Better cleanupsource-map-supportafter test to resolve (minor) memory leak (#15233)[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(#15325CVE-2024-37890)[*]Increase version ofmicromatchto^4.0.7(#15082)[*][BREAKING] Drop support for Node.js versions 14, 16, 19, 21 and 23 (#14460, #15118, #15623, #15640)[*][BREAKING] Drop support fortypescript@4.3, minimum version is now5.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 toglob@10(#14509)[*]UseTypeErroroverErrorwhere appropriate (#14799)[docs]Fix typos inCHANGELOG.mdandpackages/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/coreto^7.11(#14109)[babel-jest, @jest/transform]Updatebabel-plugin-istanbulto v6 (#15156)[babel-plugin-jest-hoist]Move unnecessarydependenciestodevDependencies(#15010)[expect][BREAKING] Remove.toBeCalled(),.toBeCalledTimes(),.toBeCalledWith(),.lastCalledWith(),.nthCalledWith(),.toReturn(),.toReturnTimes(),.toReturnWith(),.lastReturnedWith(),.nthReturnedWith()and.toThrowError()matcher aliases (#14632)[jest-cli, jest-config, @jest/types][BREAKING] Remove deprecated--initargument (#14490)[jest-config, @jest/core, jest-util]Upgradeci-info(#14655)[jest-mock][BREAKING] RemoveMockFunctionMetadataType,MockFunctionMetadataandSpyInstancetypes (#14621)[@jest/reporters]Upgradeistanbul-lib-source-maps(#14924)[jest-schemas]Upgrade@sinclair/typebox(#14775)[jest-transform]Upgradewrite-file-atomic(#14274)[jest-util]Upgradepicomatchto v4 (#14653 & #14885)[docs] Append to NODE_OPTIONS, not overwrite ([#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)See the CHANGELOG.
Does any of this look wrong? Please let us know.
Commits
See the full diff on Github. The new version differs by more commits than we can show here.
↗️ jest-leak-detector (indirect, 29.7.0 → 30.2.0) · Repo · Changelog
Release Notes
30.2.0
Chore & Maintenance
[*]Update example repo for testing React Native projects (#15832)[*]Updatejest-watch-typeaheadto v3 (#15830)Features
[jest-environment-jsdom-abstract]Add support for JSDOM v27 (#15834)Fixes
30.1.0
Features
[jest-leak-detector]Configurable GC aggressiveness regarding to V8 heap snapshot generation (#15793)[jest-runtime]Reduce redundant ReferenceError messages[jest-core]Include test modules that failed to load when --onlyFailures is activeFixes
- `[jest-snapshot-utils] Fix deprecated goo.gl snapshot guide link not getting replaced with fully canonical URL (#15787)
[jest-circus]Fixit.concurrentnot working withdescribe.skip(#15765)[jest-snapshot]Fix mangled inline snapshot updates when used with Prettier 3 and CRLF line endings[jest-runtime]Importing from@jest/globalsin more than one file no longer breaks relative paths (#15772)Chore
[expect]Update docblock fortoContain()to display info on substring check (#15789)
30.0.5 (from changelog)
Features
[jest-config]AllowtestMatchto take a string value[jest-worker]LetworkerIdleMemoryLimitaccept 0 to always restart worker child processesFixes
[expect]Fixbiginterror (#15702)
30.0.2
What's Changed
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)Full Changelog: https://github.com/jestjs/jest/blob/main/CHANGELOG.md
30.0.1
What's Changed
Features
[jest-resolver]Implement thedefaultAsyncResolver(#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 deprecatejest-replpackage (#15673)[jest-resolver]Replace customisBuiltinModulewith node'sisBuiltin(#15685)New Contributors
Full Changelog: https://github.com/jestjs/jest/blob/main/CHANGELOG.md
30.0.0
Today we are happy to announce the release of Jest 30. This release features a substantial number of changes, fixes, and improvements. While it is one of the largest major releases of Jest ever, we admit that three years for a major release is too long. In the future, we are aiming to make more frequent major releases to keep Jest great for the next decade.
If you want to skip all the news and just get going, run
npm install jest@^30.0.0and follow the migration guide: Upgrading from Jest 29 to 30.Features
[*]RenamedglobalsCleanupModetoglobalsCleanupand--waitNextEventLoopTurnForUnhandledRejectionEventsto--waitForUnhandledRejections[expect]AddArrayOfasymmetric matcher for validating array elements. (#15567)[babel-jest]Add optionexcludeJestPresetto allow opting out ofbabel-preset-jest(#15164)[expect]Revert #15038 to fixexpect(fn).toHaveBeenCalledWith(expect.objectContaining(...))when there are multiple calls (#15508)[jest-circus, jest-cli, jest-config]AddwaitNextEventLoopTurnForUnhandledRejectionEventsflag to minimise performance impact of correct detection of unhandled promise rejections introduced in #14315 (#14681)[jest-circus]Add awaitBeforeRetryoption tojest.retryTimes(#14738)[jest-circus]Add aretryImmediatelyoption tojest.retryTimes(#14696)[jest-circus, jest-jasmine2]AllowsetupFilesAfterEnvto export an async function (#10962)[jest-circus, jest-test-result]AddstartedAttimestamp inTestCaseResultObjectwithinonTestCaseResult(#15145)[jest-cli]ExportbuildArgv(#15310)[jest-config][BREAKING] Addmtsandctsto defaultmoduleFileExtensionsconfig (#14369)[jest-config][BREAKING] UpdatetestMatchandtestRegexdefault option for supportingmjs,cjs,mts, andcts(#14584)[jest-config]Loads config file from provided path inpackage.json(#14044)[jest-config]Allow loadingjest.config.ctsfiles (#14070)[jest-config]ShowrootDirin error message when apresetfails to load (#15194)[jest-config]Support loading TS config files usingesbuild-registervia 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]AddperfStatsto surface test setup overhead (#14622)[@jest/core][BREAKING] Changed--filterto accept an object with shape{ filtered: Array<string> }to match documentation (#13319)[@jest/core]Support--outputFileoption for--listTests(#14980)[@jest/core]Stringify Errors properly with--jsonflag (#15329)[@jest/core, @jest/test-sequencer][BREAKING] ExposesglobalConfig&contextstoTestSequencer(#14535, & #14543)[jest-each]Introduce%$option to add number of the test to its title (#14710)[@jest/environment][BREAKING] Remove deprecatedjest.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 thejsdomenvironment, allowing usage of custom versions of JSDOM (#14717)[jest-environment-node]Update jest environment with dispose symbolsSymbol(#14888 & #14909)[expect, @jest/expect][BREAKING] Add type inference for function parameters inCalledWithassertions (#15129)[@jest/expect-utils]Properly compare all types ofTypedArrays (#15178)[@jest/fake-timers][BREAKING] Upgrade@sinonjs/fake-timersto v13 (#14544 & #15470)[@jest/fake-timers]Exposing new modern timers functionadvanceTimersToFrame()which advances all timers by the needed milliseconds to execute callbacks currently scheduled withrequestAnimationFrame(#14598)[jest-matcher-utils]AddSERIALIZABLE_PROPERTIESto allow custom serialization of objects (#14893)[jest-mock]Add support for the Explicit Resource Management proposal to use theusingkeyword withjest.spyOn(object, methodName)(#14895)[jest-reporters]Add support for DEC mode 2026 (#15008)[jest-resolver]Supportfile://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 functionjest.advanceTimersToFrame()from@jest/fake-timers(#14598)[jest-runtime]Supportimport.meta.filenameandimport.meta.dirname(available from Node 20.11) (#14854)[jest-runtime]Supportimport.meta.resolve(#14930)[jest-runtime][BREAKING] Make it mandatory to passglobalConfigto theRuntimeconstructor (#15044)[jest-runtime]Addunstable_unmockModule(#15080)[jest-runtime]AddonGenerateMocktransformer callback for auto generated callbacks (#15433 & #15482)[jest-runtime][BREAKING] Usevm.compileFunctionovervm.Script(#15461)[@jest/schemas]Upgrade@sinclair/typeboxto v0.34 (#15450)[@jest/types]test.each(): Accept a readonly (as const) table properly (#14565)[@jest/types]Improve argument type inference passed totestanddescribecallback functions fromeachtables (#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 fromjest-snapshotinto its own package (#15095)[pretty-format][BREAKING] Do not render empty string children ('') in React plugin (#14470)Fixes
[expect]ShowAggregateErrorto display (#15346)[*]Replaceexitwithexit-x(#15399)[babel-plugin-jest-hoist]Usedenylistinstead of the deprecatedblacklistfor Babel 8 support (#14109)[babel-plugin-jest-hoist]Do not rely on buggy Babel behaviour (#15415)[expect]Check error instance type fortoThrow/toThrowError(#14576)[expect]Improve diff for failingexpect.objectContaining(#15038)[expect]UseArray.isArrayto check if an array is anArray(#15101)[expect]Fix Errorcauseassertion errors (#15339)[jest-changed-files]Print underlying errors when VCS commands fail (#15052)[jest-changed-files]Abortsl rootcall if output resembles a steam locomotive (#15053)[jest-circus][BREAKING] Prevent false test failures caused by promise rejections handled asynchronously (#14315)[jest-circus]Replace recursivemakeTestResultsimplementation with iterative one (#14760)[jest-circus]Omitexpect.hasAssertions()errors if a test already has errors (#14866)[jest-circus, jest-expect, jest-snapshot]Passtest.failingtests 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 respectrunInBandoption (#14578)[jest-config]SupporttestTimeoutin project config (#14697)[jest-config]SupportcoverageReportersin project config (#14697)[jest-config]Allowreportersin project config (#14768)[jest-config]Allow Node16/NodeNext/BundlermoduleResolutionin project's tsconfig (#14739)[@jest/create-cache-key-function]Correct the return type ofcreateCacheKey(#15159)[jest-each]Allow$keypathtemplates withnullorundefinedvalues (#14831)[@jest/expect-utils]Fix comparison ofDataView(#14408)[@jest/expect-utils][BREAKING] exclude non-enumerable in object matching (#14670)[@jest/expect-utils]Fix comparison ofURL(#14672)[@jest/expect-utils]CheckSymbolproperties 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 multiplehasteImplModulePaths (#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_importCoreModelso required core module is consistent if modified while loading (#15077)[jest-schemas, jest-types][BREAKING] Fix type oftestFailureExitCodeconfig option(#15232)[jest-util]Make sureisInteractiveworks in a browser (#14552)[pretty-format][BREAKING] PrintArrayBufferandDataViewcorrectly (#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
testPathPatternconfiguration option totestPathPatterns, which now takes a list of patterns instead of the regex.- [BREAKING]
--testPathPatternis now--testPathPatterns- [BREAKING] Specifying
testPathPatternswhen programmatically callingwatchmust be specified asnew TestPathPatterns(patterns), whereTestPathPatternscan be imported from@jest/pattern[jest-reporters, jest-runner]Unhandled errors without stack get correctly logged to console (#14619)[jest-util]Always loadmjsfiles withimport(#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 whereObjectContainingmatched non-object values. ([#15463])(#15463).
- Adds a
conditional/checkto ensure the argument passed toexpectis an object.- Add unit tests for new
ObjectContainingbehavior.- Remove
invalid/wrongtest case assertions forObjectContaining.[jest-worker]Addresses incorrect state on exit (#15610)Performance
[*][BREAKING] Bundle all of Jest's modules intoindex.js(#12348, #14550 & #14661)[jest-haste-map]Only spawn one process to check forwatchmaninstallation (#14826)[jest-runner]Better cleanupsource-map-supportafter test to resolve (minor) memory leak (#15233)[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(#15325CVE-2024-37890)[*]Increase version ofmicromatchto^4.0.7(#15082)[*][BREAKING] Drop support for Node.js versions 14, 16, 19, 21 and 23 (#14460, #15118, #15623, #15640)[*][BREAKING] Drop support fortypescript@4.3, minimum version is now5.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 toglob@10(#14509)[*]UseTypeErroroverErrorwhere appropriate (#14799)[docs]Fix typos inCHANGELOG.mdandpackages/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/coreto^7.11(#14109)[babel-jest, @jest/transform]Updatebabel-plugin-istanbulto v6 (#15156)[babel-plugin-jest-hoist]Move unnecessarydependenciestodevDependencies(#15010)[expect][BREAKING] Remove.toBeCalled(),.toBeCalledTimes(),.toBeCalledWith(),.lastCalledWith(),.nthCalledWith(),.toReturn(),.toReturnTimes(),.toReturnWith(),.lastReturnedWith(),.nthReturnedWith()and.toThrowError()matcher aliases (#14632)[jest-cli, jest-config, @jest/types][BREAKING] Remove deprecated--initargument (#14490)[jest-config, @jest/core, jest-util]Upgradeci-info(#14655)[jest-mock][BREAKING] RemoveMockFunctionMetadataType,MockFunctionMetadataandSpyInstancetypes (#14621)[@jest/reporters]Upgradeistanbul-lib-source-maps(#14924)[jest-schemas]Upgrade@sinclair/typebox(#14775)[jest-transform]Upgradewrite-file-atomic(#14274)[jest-util]Upgradepicomatchto v4 (#14653 & #14885)[docs] Append to NODE_OPTIONS, not overwrite ([#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)See the CHANGELOG.
Does any of this look wrong? Please let us know.
Commits
See the full diff on Github. The new version differs by more commits than we can show here.
↗️ jest-matcher-utils (indirect, 29.7.0 → 30.2.0) · Repo · Changelog
Release Notes
30.2.0
Chore & Maintenance
[*]Update example repo for testing React Native projects (#15832)[*]Updatejest-watch-typeaheadto v3 (#15830)Features
[jest-environment-jsdom-abstract]Add support for JSDOM v27 (#15834)Fixes
30.1.1
Fixes
[jest-snapshot-utils]Fix deprecated goo.gl snapshot warning not handling Windows end-of-line sequences (#15800)
30.1.0
Features
[jest-leak-detector]Configurable GC aggressiveness regarding to V8 heap snapshot generation (#15793)[jest-runtime]Reduce redundant ReferenceError messages[jest-core]Include test modules that failed to load when --onlyFailures is activeFixes
- `[jest-snapshot-utils] Fix deprecated goo.gl snapshot guide link not getting replaced with fully canonical URL (#15787)
[jest-circus]Fixit.concurrentnot working withdescribe.skip(#15765)[jest-snapshot]Fix mangled inline snapshot updates when used with Prettier 3 and CRLF line endings[jest-runtime]Importing from@jest/globalsin more than one file no longer breaks relative paths (#15772)Chore
[expect]Update docblock fortoContain()to display info on substring check (#15789)
30.0.5 (from changelog)
Features
[jest-config]AllowtestMatchto take a string value[jest-worker]LetworkerIdleMemoryLimitaccept 0 to always restart worker child processesFixes
[expect]Fixbiginterror (#15702)
30.0.4 (from changelog)
Features
[expect]TheInversetype is now exported (#15714)[expect]feat: supportasync functionsintoBe(#15704)Fixes
30.0.3 (from changelog)
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)
30.0.2
What's Changed
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)Full Changelog: https://github.com/jestjs/jest/blob/main/CHANGELOG.md
30.0.1
What's Changed
Features
[jest-resolver]Implement thedefaultAsyncResolver(#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 deprecatejest-replpackage (#15673)[jest-resolver]Replace customisBuiltinModulewith node'sisBuiltin(#15685)New Contributors
Full Changelog: https://github.com/jestjs/jest/blob/main/CHANGELOG.md
30.0.0
Today we are happy to announce the release of Jest 30. This release features a substantial number of changes, fixes, and improvements. While it is one of the largest major releases of Jest ever, we admit that three years for a major release is too long. In the future, we are aiming to make more frequent major releases to keep Jest great for the next decade.
If you want to skip all the news and just get going, run
npm install jest@^30.0.0and follow the migration guide: Upgrading from Jest 29 to 30.Features
[*]RenamedglobalsCleanupModetoglobalsCleanupand--waitNextEventLoopTurnForUnhandledRejectionEventsto--waitForUnhandledRejections[expect]AddArrayOfasymmetric matcher for validating array elements. (#15567)[babel-jest]Add optionexcludeJestPresetto allow opting out ofbabel-preset-jest(#15164)[expect]Revert #15038 to fixexpect(fn).toHaveBeenCalledWith(expect.objectContaining(...))when there are multiple calls (#15508)[jest-circus, jest-cli, jest-config]AddwaitNextEventLoopTurnForUnhandledRejectionEventsflag to minimise performance impact of correct detection of unhandled promise rejections introduced in #14315 (#14681)[jest-circus]Add awaitBeforeRetryoption tojest.retryTimes(#14738)[jest-circus]Add aretryImmediatelyoption tojest.retryTimes(#14696)[jest-circus, jest-jasmine2]AllowsetupFilesAfterEnvto export an async function (#10962)[jest-circus, jest-test-result]AddstartedAttimestamp inTestCaseResultObjectwithinonTestCaseResult(#15145)[jest-cli]ExportbuildArgv(#15310)[jest-config][BREAKING] Addmtsandctsto defaultmoduleFileExtensionsconfig (#14369)[jest-config][BREAKING] UpdatetestMatchandtestRegexdefault option for supportingmjs,cjs,mts, andcts(#14584)[jest-config]Loads config file from provided path inpackage.json(#14044)[jest-config]Allow loadingjest.config.ctsfiles (#14070)[jest-config]ShowrootDirin error message when apresetfails to load (#15194)[jest-config]Support loading TS config files usingesbuild-registervia 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]AddperfStatsto surface test setup overhead (#14622)[@jest/core][BREAKING] Changed--filterto accept an object with shape{ filtered: Array<string> }to match documentation (#13319)[@jest/core]Support--outputFileoption for--listTests(#14980)[@jest/core]Stringify Errors properly with--jsonflag (#15329)[@jest/core, @jest/test-sequencer][BREAKING] ExposesglobalConfig&contextstoTestSequencer(#14535, & #14543)[jest-each]Introduce%$option to add number of the test to its title (#14710)[@jest/environment][BREAKING] Remove deprecatedjest.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 thejsdomenvironment, allowing usage of custom versions of JSDOM (#14717)[jest-environment-node]Update jest environment with dispose symbolsSymbol(#14888 & #14909)[expect, @jest/expect][BREAKING] Add type inference for function parameters inCalledWithassertions (#15129)[@jest/expect-utils]Properly compare all types ofTypedArrays (#15178)[@jest/fake-timers][BREAKING] Upgrade@sinonjs/fake-timersto v13 (#14544 & #15470)[@jest/fake-timers]Exposing new modern timers functionadvanceTimersToFrame()which advances all timers by the needed milliseconds to execute callbacks currently scheduled withrequestAnimationFrame(#14598)[jest-matcher-utils]AddSERIALIZABLE_PROPERTIESto allow custom serialization of objects (#14893)[jest-mock]Add support for the Explicit Resource Management proposal to use theusingkeyword withjest.spyOn(object, methodName)(#14895)[jest-reporters]Add support for DEC mode 2026 (#15008)[jest-resolver]Supportfile://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 functionjest.advanceTimersToFrame()from@jest/fake-timers(#14598)[jest-runtime]Supportimport.meta.filenameandimport.meta.dirname(available from Node 20.11) (#14854)[jest-runtime]Supportimport.meta.resolve(#14930)[jest-runtime][BREAKING] Make it mandatory to passglobalConfigto theRuntimeconstructor (#15044)[jest-runtime]Addunstable_unmockModule(#15080)[jest-runtime]AddonGenerateMocktransformer callback for auto generated callbacks (#15433 & #15482)[jest-runtime][BREAKING] Usevm.compileFunctionovervm.Script(#15461)[@jest/schemas]Upgrade@sinclair/typeboxto v0.34 (#15450)[@jest/types]test.each(): Accept a readonly (as const) table properly (#14565)[@jest/types]Improve argument type inference passed totestanddescribecallback functions fromeachtables (#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 fromjest-snapshotinto its own package (#15095)[pretty-format][BREAKING] Do not render empty string children ('') in React plugin (#14470)Fixes
[expect]ShowAggregateErrorto display (#15346)[*]Replaceexitwithexit-x(#15399)[babel-plugin-jest-hoist]Usedenylistinstead of the deprecatedblacklistfor Babel 8 support (#14109)[babel-plugin-jest-hoist]Do not rely on buggy Babel behaviour (#15415)[expect]Check error instance type fortoThrow/toThrowError(#14576)[expect]Improve diff for failingexpect.objectContaining(#15038)[expect]UseArray.isArrayto check if an array is anArray(#15101)[expect]Fix Errorcauseassertion errors (#15339)[jest-changed-files]Print underlying errors when VCS commands fail (#15052)[jest-changed-files]Abortsl rootcall if output resembles a steam locomotive (#15053)[jest-circus][BREAKING] Prevent false test failures caused by promise rejections handled asynchronously (#14315)[jest-circus]Replace recursivemakeTestResultsimplementation with iterative one (#14760)[jest-circus]Omitexpect.hasAssertions()errors if a test already has errors (#14866)[jest-circus, jest-expect, jest-snapshot]Passtest.failingtests 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 respectrunInBandoption (#14578)[jest-config]SupporttestTimeoutin project config (#14697)[jest-config]SupportcoverageReportersin project config (#14697)[jest-config]Allowreportersin project config (#14768)[jest-config]Allow Node16/NodeNext/BundlermoduleResolutionin project's tsconfig (#14739)[@jest/create-cache-key-function]Correct the return type ofcreateCacheKey(#15159)[jest-each]Allow$keypathtemplates withnullorundefinedvalues (#14831)[@jest/expect-utils]Fix comparison ofDataView(#14408)[@jest/expect-utils][BREAKING] exclude non-enumerable in object matching (#14670)[@jest/expect-utils]Fix comparison ofURL(#14672)[@jest/expect-utils]CheckSymbolproperties 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 multiplehasteImplModulePaths (#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_importCoreModelso required core module is consistent if modified while loading (#15077)[jest-schemas, jest-types][BREAKING] Fix type oftestFailureExitCodeconfig option(#15232)[jest-util]Make sureisInteractiveworks in a browser (#14552)[pretty-format][BREAKING] PrintArrayBufferandDataViewcorrectly (#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
testPathPatternconfiguration option totestPathPatterns, which now takes a list of patterns instead of the regex.- [BREAKING]
--testPathPatternis now--testPathPatterns- [BREAKING] Specifying
testPathPatternswhen programmatically callingwatchmust be specified asnew TestPathPatterns(patterns), whereTestPathPatternscan be imported from@jest/pattern[jest-reporters, jest-runner]Unhandled errors without stack get correctly logged to console (#14619)[jest-util]Always loadmjsfiles withimport(#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 whereObjectContainingmatched non-object values. ([#15463])(#15463).
- Adds a
conditional/checkto ensure the argument passed toexpectis an object.- Add unit tests for new
ObjectContainingbehavior.- Remove
invalid/wrongtest case assertions forObjectContaining.[jest-worker]Addresses incorrect state on exit (#15610)Performance
[*][BREAKING] Bundle all of Jest's modules intoindex.js(#12348, #14550 & #14661)[jest-haste-map]Only spawn one process to check forwatchmaninstallation (#14826)[jest-runner]Better cleanupsource-map-supportafter test to resolve (minor) memory leak (#15233)[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(#15325CVE-2024-37890)[*]Increase version ofmicromatchto^4.0.7(#15082)[*][BREAKING] Drop support for Node.js versions 14, 16, 19, 21 and 23 (#14460, #15118, #15623, #15640)[*][BREAKING] Drop support fortypescript@4.3, minimum version is now5.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 toglob@10(#14509)[*]UseTypeErroroverErrorwhere appropriate (#14799)[docs]Fix typos inCHANGELOG.mdandpackages/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/coreto^7.11(#14109)[babel-jest, @jest/transform]Updatebabel-plugin-istanbulto v6 (#15156)[babel-plugin-jest-hoist]Move unnecessarydependenciestodevDependencies(#15010)[expect][BREAKING] Remove.toBeCalled(),.toBeCalledTimes(),.toBeCalledWith(),.lastCalledWith(),.nthCalledWith(),.toReturn(),.toReturnTimes(),.toReturnWith(),.lastReturnedWith(),.nthReturnedWith()and.toThrowError()matcher aliases (#14632)[jest-cli, jest-config, @jest/types][BREAKING] Remove deprecated--initargument (#14490)[jest-config, @jest/core, jest-util]Upgradeci-info(#14655)[jest-mock][BREAKING] RemoveMockFunctionMetadataType,MockFunctionMetadataandSpyInstancetypes (#14621)[@jest/reporters]Upgradeistanbul-lib-source-maps(#14924)[jest-schemas]Upgrade@sinclair/typebox(#14775)[jest-transform]Upgradewrite-file-atomic(#14274)[jest-util]Upgradepicomatchto v4 (#14653 & #14885)[docs] Append to NODE_OPTIONS, not overwrite ([#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)See the CHANGELOG.
Does any of this look wrong? Please let us know.
Commits
See the full diff on Github. The new version differs by more commits than we can show here.
↗️ jest-message-util (indirect, 29.7.0 → 30.2.0) · Repo · Changelog
Release Notes
30.2.0
Chore & Maintenance
[*]Update example repo for testing React Native projects (#15832)[*]Updatejest-watch-typeaheadto v3 (#15830)Features
[jest-environment-jsdom-abstract]Add support for JSDOM v27 (#15834)Fixes
30.1.0
Features
[jest-leak-detector]Configurable GC aggressiveness regarding to V8 heap snapshot generation (#15793)[jest-runtime]Reduce redundant ReferenceError messages[jest-core]Include test modules that failed to load when --onlyFailures is activeFixes
- `[jest-snapshot-utils] Fix deprecated goo.gl snapshot guide link not getting replaced with fully canonical URL (#15787)
[jest-circus]Fixit.concurrentnot working withdescribe.skip(#15765)[jest-snapshot]Fix mangled inline snapshot updates when used with Prettier 3 and CRLF line endings[jest-runtime]Importing from@jest/globalsin more than one file no longer breaks relative paths (#15772)Chore
[expect]Update docblock fortoContain()to display info on substring check (#15789)
30.0.5 (from changelog)
Features
[jest-config]AllowtestMatchto take a string value[jest-worker]LetworkerIdleMemoryLimitaccept 0 to always restart worker child processesFixes
[expect]Fixbiginterror (#15702)
30.0.2
What's Changed
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)Full Changelog: https://github.com/jestjs/jest/blob/main/CHANGELOG.md
30.0.1
What's Changed
Features
[jest-resolver]Implement thedefaultAsyncResolver(#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 deprecatejest-replpackage (#15673)[jest-resolver]Replace customisBuiltinModulewith node'sisBuiltin(#15685)New Contributors
Full Changelog: https://github.com/jestjs/jest/blob/main/CHANGELOG.md
30.0.0
Today we are happy to announce the release of Jest 30. This release features a substantial number of changes, fixes, and improvements. While it is one of the largest major releases of Jest ever, we admit that three years for a major release is too long. In the future, we are aiming to make more frequent major releases to keep Jest great for the next decade.
If you want to skip all the news and just get going, run
npm install jest@^30.0.0and follow the migration guide: Upgrading from Jest 29 to 30.Features
[*]RenamedglobalsCleanupModetoglobalsCleanupand--waitNextEventLoopTurnForUnhandledRejectionEventsto--waitForUnhandledRejections[expect]AddArrayOfasymmetric matcher for validating array elements. (#15567)[babel-jest]Add optionexcludeJestPresetto allow opting out ofbabel-preset-jest(#15164)[expect]Revert #15038 to fixexpect(fn).toHaveBeenCalledWith(expect.objectContaining(...))when there are multiple calls (#15508)[jest-circus, jest-cli, jest-config]AddwaitNextEventLoopTurnForUnhandledRejectionEventsflag to minimise performance impact of correct detection of unhandled promise rejections introduced in #14315 (#14681)[jest-circus]Add awaitBeforeRetryoption tojest.retryTimes(#14738)[jest-circus]Add aretryImmediatelyoption tojest.retryTimes(#14696)[jest-circus, jest-jasmine2]AllowsetupFilesAfterEnvto export an async function (#10962)[jest-circus, jest-test-result]AddstartedAttimestamp inTestCaseResultObjectwithinonTestCaseResult(#15145)[jest-cli]ExportbuildArgv(#15310)[jest-config][BREAKING] Addmtsandctsto defaultmoduleFileExtensionsconfig (#14369)[jest-config][BREAKING] UpdatetestMatchandtestRegexdefault option for supportingmjs,cjs,mts, andcts(#14584)[jest-config]Loads config file from provided path inpackage.json(#14044)[jest-config]Allow loadingjest.config.ctsfiles (#14070)[jest-config]ShowrootDirin error message when apresetfails to load (#15194)[jest-config]Support loading TS config files usingesbuild-registervia 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]AddperfStatsto surface test setup overhead (#14622)[@jest/core][BREAKING] Changed--filterto accept an object with shape{ filtered: Array<string> }to match documentation (#13319)[@jest/core]Support--outputFileoption for--listTests(#14980)[@jest/core]Stringify Errors properly with--jsonflag (#15329)[@jest/core, @jest/test-sequencer][BREAKING] ExposesglobalConfig&contextstoTestSequencer(#14535, & #14543)[jest-each]Introduce%$option to add number of the test to its title (#14710)[@jest/environment][BREAKING] Remove deprecatedjest.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 thejsdomenvironment, allowing usage of custom versions of JSDOM (#14717)[jest-environment-node]Update jest environment with dispose symbolsSymbol(#14888 & #14909)[expect, @jest/expect][BREAKING] Add type inference for function parameters inCalledWithassertions (#15129)[@jest/expect-utils]Properly compare all types ofTypedArrays (#15178)[@jest/fake-timers][BREAKING] Upgrade@sinonjs/fake-timersto v13 (#14544 & #15470)[@jest/fake-timers]Exposing new modern timers functionadvanceTimersToFrame()which advances all timers by the needed milliseconds to execute callbacks currently scheduled withrequestAnimationFrame(#14598)[jest-matcher-utils]AddSERIALIZABLE_PROPERTIESto allow custom serialization of objects (#14893)[jest-mock]Add support for the Explicit Resource Management proposal to use theusingkeyword withjest.spyOn(object, methodName)(#14895)[jest-reporters]Add support for DEC mode 2026 (#15008)[jest-resolver]Supportfile://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 functionjest.advanceTimersToFrame()from@jest/fake-timers(#14598)[jest-runtime]Supportimport.meta.filenameandimport.meta.dirname(available from Node 20.11) (#14854)[jest-runtime]Supportimport.meta.resolve(#14930)[jest-runtime][BREAKING] Make it mandatory to passglobalConfigto theRuntimeconstructor (#15044)[jest-runtime]Addunstable_unmockModule(#15080)[jest-runtime]AddonGenerateMocktransformer callback for auto generated callbacks (#15433 & #15482)[jest-runtime][BREAKING] Usevm.compileFunctionovervm.Script(#15461)[@jest/schemas]Upgrade@sinclair/typeboxto v0.34 (#15450)[@jest/types]test.each(): Accept a readonly (as const) table properly (#14565)[@jest/types]Improve argument type inference passed totestanddescribecallback functions fromeachtables (#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 fromjest-snapshotinto its own package (#15095)[pretty-format][BREAKING] Do not render empty string children ('') in React plugin (#14470)Fixes
[expect]ShowAggregateErrorto display (#15346)[*]Replaceexitwithexit-x(#15399)[babel-plugin-jest-hoist]Usedenylistinstead of the deprecatedblacklistfor Babel 8 support (#14109)[babel-plugin-jest-hoist]Do not rely on buggy Babel behaviour (#15415)[expect]Check error instance type fortoThrow/toThrowError(#14576)[expect]Improve diff for failingexpect.objectContaining(#15038)[expect]UseArray.isArrayto check if an array is anArray(#15101)[expect]Fix Errorcauseassertion errors (#15339)[jest-changed-files]Print underlying errors when VCS commands fail (#15052)[jest-changed-files]Abortsl rootcall if output resembles a steam locomotive (#15053)[jest-circus][BREAKING] Prevent false test failures caused by promise rejections handled asynchronously (#14315)[jest-circus]Replace recursivemakeTestResultsimplementation with iterative one (#14760)[jest-circus]Omitexpect.hasAssertions()errors if a test already has errors (#14866)[jest-circus, jest-expect, jest-snapshot]Passtest.failingtests 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 respectrunInBandoption (#14578)[jest-config]SupporttestTimeoutin project config (#14697)[jest-config]SupportcoverageReportersin project config (#14697)[jest-config]Allowreportersin project config (#14768)[jest-config]Allow Node16/NodeNext/BundlermoduleResolutionin project's tsconfig (#14739)[@jest/create-cache-key-function]Correct the return type ofcreateCacheKey(#15159)[jest-each]Allow$keypathtemplates withnullorundefinedvalues (#14831)[@jest/expect-utils]Fix comparison ofDataView(#14408)[@jest/expect-utils][BREAKING] exclude non-enumerable in object matching (#14670)[@jest/expect-utils]Fix comparison ofURL(#14672)[@jest/expect-utils]CheckSymbolproperties 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 multiplehasteImplModulePaths (#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_importCoreModelso required core module is consistent if modified while loading (#15077)[jest-schemas, jest-types][BREAKING] Fix type oftestFailureExitCodeconfig option(#15232)[jest-util]Make sureisInteractiveworks in a browser (#14552)[pretty-format][BREAKING] PrintArrayBufferandDataViewcorrectly (#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
testPathPatternconfiguration option totestPathPatterns, which now takes a list of patterns instead of the regex.- [BREAKING]
--testPathPatternis now--testPathPatterns- [BREAKING] Specifying
testPathPatternswhen programmatically callingwatchmust be specified asnew TestPathPatterns(patterns), whereTestPathPatternscan be imported from@jest/pattern[jest-reporters, jest-runner]Unhandled errors without stack get correctly logged to console (#14619)[jest-util]Always loadmjsfiles withimport(#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 whereObjectContainingmatched non-object values. ([#15463])(#15463).
- Adds a
conditional/checkto ensure the argument passed toexpectis an object.- Add unit tests for new
ObjectContainingbehavior.- Remove
invalid/wrongtest case assertions forObjectContaining.[jest-worker]Addresses incorrect state on exit (#15610)Performance
[*][BREAKING] Bundle all of Jest's modules intoindex.js(#12348, #14550 & #14661)[jest-haste-map]Only spawn one process to check forwatchmaninstallation (#14826)[jest-runner]Better cleanupsource-map-supportafter test to resolve (minor) memory leak (#15233)[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(#15325CVE-2024-37890)[*]Increase version ofmicromatchto^4.0.7(#15082)[*][BREAKING] Drop support for Node.js versions 14, 16, 19, 21 and 23 (#14460, #15118, #15623, #15640)[*][BREAKING] Drop support fortypescript@4.3, minimum version is now5.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 toglob@10(#14509)[*]UseTypeErroroverErrorwhere appropriate (#14799)[docs]Fix typos inCHANGELOG.mdandpackages/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/coreto^7.11(#14109)[babel-jest, @jest/transform]Updatebabel-plugin-istanbulto v6 (#15156)[babel-plugin-jest-hoist]Move unnecessarydependenciestodevDependencies(#15010)[expect][BREAKING] Remove.toBeCalled(),.toBeCalledTimes(),.toBeCalledWith(),.lastCalledWith(),.nthCalledWith(),.toReturn(),.toReturnTimes(),.toReturnWith(),.lastReturnedWith(),.nthReturnedWith()and.toThrowError()matcher aliases (#14632)[jest-cli, jest-config, @jest/types][BREAKING] Remove deprecated--initargument (#14490)[jest-config, @jest/core, jest-util]Upgradeci-info(#14655)[jest-mock][BREAKING] RemoveMockFunctionMetadataType,MockFunctionMetadataandSpyInstancetypes (#14621)[@jest/reporters]Upgradeistanbul-lib-source-maps(#14924)[jest-schemas]Upgrade@sinclair/typebox(#14775)[jest-transform]Upgradewrite-file-atomic(#14274)[jest-util]Upgradepicomatchto v4 (#14653 & #14885)[docs] Append to NODE_OPTIONS, not overwrite ([#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)See the CHANGELOG.
Does any of this look wrong? Please let us know.
Commits
See the full diff on Github. The new version differs by more commits than we can show here.
↗️ jest-mock (indirect, 29.7.0 → 30.2.0) · Repo · Changelog
Release Notes
30.2.0
Chore & Maintenance
[*]Update example repo for testing React Native projects (#15832)[*]Updatejest-watch-typeaheadto v3 (#15830)Features
[jest-environment-jsdom-abstract]Add support for JSDOM v27 (#15834)Fixes
30.0.5 (from changelog)
Features
[jest-config]AllowtestMatchto take a string value[jest-worker]LetworkerIdleMemoryLimitaccept 0 to always restart worker child processesFixes
[expect]Fixbiginterror (#15702)
30.0.2
What's Changed
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)Full Changelog: https://github.com/jestjs/jest/blob/main/CHANGELOG.md
30.0.1
What's Changed
Features
[jest-resolver]Implement thedefaultAsyncResolver(#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 deprecatejest-replpackage (#15673)[jest-resolver]Replace customisBuiltinModulewith node'sisBuiltin(#15685)New Contributors
Full Changelog: https://github.com/jestjs/jest/blob/main/CHANGELOG.md
30.0.0
Today we are happy to announce the release of Jest 30. This release features a substantial number of changes, fixes, and improvements. While it is one of the largest major releases of Jest ever, we admit that three years for a major release is too long. In the future, we are aiming to make more frequent major releases to keep Jest great for the next decade.
If you want to skip all the news and just get going, run
npm install jest@^30.0.0and follow the migration guide: Upgrading from Jest 29 to 30.Features
[*]RenamedglobalsCleanupModetoglobalsCleanupand--waitNextEventLoopTurnForUnhandledRejectionEventsto--waitForUnhandledRejections[expect]AddArrayOfasymmetric matcher for validating array elements. (#15567)[babel-jest]Add optionexcludeJestPresetto allow opting out ofbabel-preset-jest(#15164)[expect]Revert #15038 to fixexpect(fn).toHaveBeenCalledWith(expect.objectContaining(...))when there are multiple calls (#15508)[jest-circus, jest-cli, jest-config]AddwaitNextEventLoopTurnForUnhandledRejectionEventsflag to minimise performance impact of correct detection of unhandled promise rejections introduced in #14315 (#14681)[jest-circus]Add awaitBeforeRetryoption tojest.retryTimes(#14738)[jest-circus]Add aretryImmediatelyoption tojest.retryTimes(#14696)[jest-circus, jest-jasmine2]AllowsetupFilesAfterEnvto export an async function (#10962)[jest-circus, jest-test-result]AddstartedAttimestamp inTestCaseResultObjectwithinonTestCaseResult(#15145)[jest-cli]ExportbuildArgv(#15310)[jest-config][BREAKING] Addmtsandctsto defaultmoduleFileExtensionsconfig (#14369)[jest-config][BREAKING] UpdatetestMatchandtestRegexdefault option for supportingmjs,cjs,mts, andcts(#14584)[jest-config]Loads config file from provided path inpackage.json(#14044)[jest-config]Allow loadingjest.config.ctsfiles (#14070)[jest-config]ShowrootDirin error message when apresetfails to load (#15194)[jest-config]Support loading TS config files usingesbuild-registervia 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]AddperfStatsto surface test setup overhead (#14622)[@jest/core][BREAKING] Changed--filterto accept an object with shape{ filtered: Array<string> }to match documentation (#13319)[@jest/core]Support--outputFileoption for--listTests(#14980)[@jest/core]Stringify Errors properly with--jsonflag (#15329)[@jest/core, @jest/test-sequencer][BREAKING] ExposesglobalConfig&contextstoTestSequencer(#14535, & #14543)[jest-each]Introduce%$option to add number of the test to its title (#14710)[@jest/environment][BREAKING] Remove deprecatedjest.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 thejsdomenvironment, allowing usage of custom versions of JSDOM (#14717)[jest-environment-node]Update jest environment with dispose symbolsSymbol(#14888 & #14909)[expect, @jest/expect][BREAKING] Add type inference for function parameters inCalledWithassertions (#15129)[@jest/expect-utils]Properly compare all types ofTypedArrays (#15178)[@jest/fake-timers][BREAKING] Upgrade@sinonjs/fake-timersto v13 (#14544 & #15470)[@jest/fake-timers]Exposing new modern timers functionadvanceTimersToFrame()which advances all timers by the needed milliseconds to execute callbacks currently scheduled withrequestAnimationFrame(#14598)[jest-matcher-utils]AddSERIALIZABLE_PROPERTIESto allow custom serialization of objects (#14893)[jest-mock]Add support for the Explicit Resource Management proposal to use theusingkeyword withjest.spyOn(object, methodName)(#14895)[jest-reporters]Add support for DEC mode 2026 (#15008)[jest-resolver]Supportfile://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 functionjest.advanceTimersToFrame()from@jest/fake-timers(#14598)[jest-runtime]Supportimport.meta.filenameandimport.meta.dirname(available from Node 20.11) (#14854)[jest-runtime]Supportimport.meta.resolve(#14930)[jest-runtime][BREAKING] Make it mandatory to passglobalConfigto theRuntimeconstructor (#15044)[jest-runtime]Addunstable_unmockModule(#15080)[jest-runtime]AddonGenerateMocktransformer callback for auto generated callbacks (#15433 & #15482)[jest-runtime][BREAKING] Usevm.compileFunctionovervm.Script(#15461)[@jest/schemas]Upgrade@sinclair/typeboxto v0.34 (#15450)[@jest/types]test.each(): Accept a readonly (as const) table properly (#14565)[@jest/types]Improve argument type inference passed totestanddescribecallback functions fromeachtables (#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 fromjest-snapshotinto its own package (#15095)[pretty-format][BREAKING] Do not render empty string children ('') in React plugin (#14470)Fixes
[expect]ShowAggregateErrorto display (#15346)[*]Replaceexitwithexit-x(#15399)[babel-plugin-jest-hoist]Usedenylistinstead of the deprecatedblacklistfor Babel 8 support (#14109)[babel-plugin-jest-hoist]Do not rely on buggy Babel behaviour (#15415)[expect]Check error instance type fortoThrow/toThrowError(#14576)[expect]Improve diff for failingexpect.objectContaining(#15038)[expect]UseArray.isArrayto check if an array is anArray(#15101)[expect]Fix Errorcauseassertion errors (#15339)[jest-changed-files]Print underlying errors when VCS commands fail (#15052)[jest-changed-files]Abortsl rootcall if output resembles a steam locomotive (#15053)[jest-circus][BREAKING] Prevent false test failures caused by promise rejections handled asynchronously (#14315)[jest-circus]Replace recursivemakeTestResultsimplementation with iterative one (#14760)[jest-circus]Omitexpect.hasAssertions()errors if a test already has errors (#14866)[jest-circus, jest-expect, jest-snapshot]Passtest.failingtests 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 respectrunInBandoption (#14578)[jest-config]SupporttestTimeoutin project config (#14697)[jest-config]SupportcoverageReportersin project config (#14697)[jest-config]Allowreportersin project config (#14768)[jest-config]Allow Node16/NodeNext/BundlermoduleResolutionin project's tsconfig (#14739)[@jest/create-cache-key-function]Correct the return type ofcreateCacheKey(#15159)[jest-each]Allow$keypathtemplates withnullorundefinedvalues (#14831)[@jest/expect-utils]Fix comparison ofDataView(#14408)[@jest/expect-utils][BREAKING] exclude non-enumerable in object matching (#14670)[@jest/expect-utils]Fix comparison ofURL(#14672)[@jest/expect-utils]CheckSymbolproperties 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 multiplehasteImplModulePaths (#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_importCoreModelso required core module is consistent if modified while loading (#15077)[jest-schemas, jest-types][BREAKING] Fix type oftestFailureExitCodeconfig option(#15232)[jest-util]Make sureisInteractiveworks in a browser (#14552)[pretty-format][BREAKING] PrintArrayBufferandDataViewcorrectly (#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
testPathPatternconfiguration option totestPathPatterns, which now takes a list of patterns instead of the regex.- [BREAKING]
--testPathPatternis now--testPathPatterns- [BREAKING] Specifying
testPathPatternswhen programmatically callingwatchmust be specified asnew TestPathPatterns(patterns), whereTestPathPatternscan be imported from@jest/pattern[jest-reporters, jest-runner]Unhandled errors without stack get correctly logged to console (#14619)[jest-util]Always loadmjsfiles withimport(#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 whereObjectContainingmatched non-object values. ([#15463])(#15463).
- Adds a
conditional/checkto ensure the argument passed toexpectis an object.- Add unit tests for new
ObjectContainingbehavior.- Remove
invalid/wrongtest case assertions forObjectContaining.[jest-worker]Addresses incorrect state on exit (#15610)Performance
[*][BREAKING] Bundle all of Jest's modules intoindex.js(#12348, #14550 & #14661)[jest-haste-map]Only spawn one process to check forwatchmaninstallation (#14826)[jest-runner]Better cleanupsource-map-supportafter test to resolve (minor) memory leak (#15233)[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(#15325CVE-2024-37890)[*]Increase version ofmicromatchto^4.0.7(#15082)[*][BREAKING] Drop support for Node.js versions 14, 16, 19, 21 and 23 (#14460, #15118, #15623, #15640)[*][BREAKING] Drop support fortypescript@4.3, minimum version is now5.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 toglob@10(#14509)[*]UseTypeErroroverErrorwhere appropriate (#14799)[docs]Fix typos inCHANGELOG.mdandpackages/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/coreto^7.11(#14109)[babel-jest, @jest/transform]Updatebabel-plugin-istanbulto v6 (#15156)[babel-plugin-jest-hoist]Move unnecessarydependenciestodevDependencies(#15010)[expect][BREAKING] Remove.toBeCalled(),.toBeCalledTimes(),.toBeCalledWith(),.lastCalledWith(),.nthCalledWith(),.toReturn(),.toReturnTimes(),.toReturnWith(),.lastReturnedWith(),.nthReturnedWith()and.toThrowError()matcher aliases (#14632)[jest-cli, jest-config, @jest/types][BREAKING] Remove deprecated--initargument (#14490)[jest-config, @jest/core, jest-util]Upgradeci-info(#14655)[jest-mock][BREAKING] RemoveMockFunctionMetadataType,MockFunctionMetadataandSpyInstancetypes (#14621)[@jest/reporters]Upgradeistanbul-lib-source-maps(#14924)[jest-schemas]Upgrade@sinclair/typebox(#14775)[jest-transform]Upgradewrite-file-atomic(#14274)[jest-util]Upgradepicomatchto v4 (#14653 & #14885)[docs] Append to NODE_OPTIONS, not overwrite ([#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)See the CHANGELOG.
Does any of this look wrong? Please let us know.
Commits
See the full diff on Github. The new version differs by more commits than we can show here.
↗️ jest-regex-util (indirect, 29.6.3 → 30.0.1) · Repo · Changelog
Release Notes
30.0.1
What's Changed
Features
[jest-resolver]Implement thedefaultAsyncResolver(#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 deprecatejest-replpackage (#15673)[jest-resolver]Replace customisBuiltinModulewith node'sisBuiltin(#15685)New Contributors
Full Changelog: https://github.com/jestjs/jest/blob/main/CHANGELOG.md
30.0.0
Today we are happy to announce the release of Jest 30. This release features a substantial number of changes, fixes, and improvements. While it is one of the largest major releases of Jest ever, we admit that three years for a major release is too long. In the future, we are aiming to make more frequent major releases to keep Jest great for the next decade.
If you want to skip all the news and just get going, run
npm install jest@^30.0.0and follow the migration guide: Upgrading from Jest 29 to 30.Features
[*]RenamedglobalsCleanupModetoglobalsCleanupand--waitNextEventLoopTurnForUnhandledRejectionEventsto--waitForUnhandledRejections[expect]AddArrayOfasymmetric matcher for validating array elements. (#15567)[babel-jest]Add optionexcludeJestPresetto allow opting out ofbabel-preset-jest(#15164)[expect]Revert #15038 to fixexpect(fn).toHaveBeenCalledWith(expect.objectContaining(...))when there are multiple calls (#15508)[jest-circus, jest-cli, jest-config]AddwaitNextEventLoopTurnForUnhandledRejectionEventsflag to minimise performance impact of correct detection of unhandled promise rejections introduced in #14315 (#14681)[jest-circus]Add awaitBeforeRetryoption tojest.retryTimes(#14738)[jest-circus]Add aretryImmediatelyoption tojest.retryTimes(#14696)[jest-circus, jest-jasmine2]AllowsetupFilesAfterEnvto export an async function (#10962)[jest-circus, jest-test-result]AddstartedAttimestamp inTestCaseResultObjectwithinonTestCaseResult(#15145)[jest-cli]ExportbuildArgv(#15310)[jest-config][BREAKING] Addmtsandctsto defaultmoduleFileExtensionsconfig (#14369)[jest-config][BREAKING] UpdatetestMatchandtestRegexdefault option for supportingmjs,cjs,mts, andcts(#14584)[jest-config]Loads config file from provided path inpackage.json(#14044)[jest-config]Allow loadingjest.config.ctsfiles (#14070)[jest-config]ShowrootDirin error message when apresetfails to load (#15194)[jest-config]Support loading TS config files usingesbuild-registervia 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]AddperfStatsto surface test setup overhead (#14622)[@jest/core][BREAKING] Changed--filterto accept an object with shape{ filtered: Array<string> }to match documentation (#13319)[@jest/core]Support--outputFileoption for--listTests(#14980)[@jest/core]Stringify Errors properly with--jsonflag (#15329)[@jest/core, @jest/test-sequencer][BREAKING] ExposesglobalConfig&contextstoTestSequencer(#14535, & #14543)[jest-each]Introduce%$option to add number of the test to its title (#14710)[@jest/environment][BREAKING] Remove deprecatedjest.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 thejsdomenvironment, allowing usage of custom versions of JSDOM (#14717)[jest-environment-node]Update jest environment with dispose symbolsSymbol(#14888 & #14909)[expect, @jest/expect][BREAKING] Add type inference for function parameters inCalledWithassertions (#15129)[@jest/expect-utils]Properly compare all types ofTypedArrays (#15178)[@jest/fake-timers][BREAKING] Upgrade@sinonjs/fake-timersto v13 (#14544 & #15470)[@jest/fake-timers]Exposing new modern timers functionadvanceTimersToFrame()which advances all timers by the needed milliseconds to execute callbacks currently scheduled withrequestAnimationFrame(#14598)[jest-matcher-utils]AddSERIALIZABLE_PROPERTIESto allow custom serialization of objects (#14893)[jest-mock]Add support for the Explicit Resource Management proposal to use theusingkeyword withjest.spyOn(object, methodName)(#14895)[jest-reporters]Add support for DEC mode 2026 (#15008)[jest-resolver]Supportfile://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 functionjest.advanceTimersToFrame()from@jest/fake-timers(#14598)[jest-runtime]Supportimport.meta.filenameandimport.meta.dirname(available from Node 20.11) (#14854)[jest-runtime]Supportimport.meta.resolve(#14930)[jest-runtime][BREAKING] Make it mandatory to passglobalConfigto theRuntimeconstructor (#15044)[jest-runtime]Addunstable_unmockModule(#15080)[jest-runtime]AddonGenerateMocktransformer callback for auto generated callbacks (#15433 & #15482)[jest-runtime][BREAKING] Usevm.compileFunctionovervm.Script(#15461)[@jest/schemas]Upgrade@sinclair/typeboxto v0.34 (#15450)[@jest/types]test.each(): Accept a readonly (as const) table properly (#14565)[@jest/types]Improve argument type inference passed totestanddescribecallback functions fromeachtables (#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 fromjest-snapshotinto its own package (#15095)[pretty-format][BREAKING] Do not render empty string children ('') in React plugin (#14470)Fixes
[expect]ShowAggregateErrorto display (#15346)[*]Replaceexitwithexit-x(#15399)[babel-plugin-jest-hoist]Usedenylistinstead of the deprecatedblacklistfor Babel 8 support (#14109)[babel-plugin-jest-hoist]Do not rely on buggy Babel behaviour (#15415)[expect]Check error instance type fortoThrow/toThrowError(#14576)[expect]Improve diff for failingexpect.objectContaining(#15038)[expect]UseArray.isArrayto check if an array is anArray(#15101)[expect]Fix Errorcauseassertion errors (#15339)[jest-changed-files]Print underlying errors when VCS commands fail (#15052)[jest-changed-files]Abortsl rootcall if output resembles a steam locomotive (#15053)[jest-circus][BREAKING] Prevent false test failures caused by promise rejections handled asynchronously (#14315)[jest-circus]Replace recursivemakeTestResultsimplementation with iterative one (#14760)[jest-circus]Omitexpect.hasAssertions()errors if a test already has errors (#14866)[jest-circus, jest-expect, jest-snapshot]Passtest.failingtests 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 respectrunInBandoption (#14578)[jest-config]SupporttestTimeoutin project config (#14697)[jest-config]SupportcoverageReportersin project config (#14697)[jest-config]Allowreportersin project config (#14768)[jest-config]Allow Node16/NodeNext/BundlermoduleResolutionin project's tsconfig (#14739)[@jest/create-cache-key-function]Correct the return type ofcreateCacheKey(#15159)[jest-each]Allow$keypathtemplates withnullorundefinedvalues (#14831)[@jest/expect-utils]Fix comparison ofDataView(#14408)[@jest/expect-utils][BREAKING] exclude non-enumerable in object matching (#14670)[@jest/expect-utils]Fix comparison ofURL(#14672)[@jest/expect-utils]CheckSymbolproperties 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 multiplehasteImplModulePaths (#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_importCoreModelso required core module is consistent if modified while loading (#15077)[jest-schemas, jest-types][BREAKING] Fix type oftestFailureExitCodeconfig option(#15232)[jest-util]Make sureisInteractiveworks in a browser (#14552)[pretty-format][BREAKING] PrintArrayBufferandDataViewcorrectly (#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
testPathPatternconfiguration option totestPathPatterns, which now takes a list of patterns instead of the regex.- [BREAKING]
--testPathPatternis now--testPathPatterns- [BREAKING] Specifying
testPathPatternswhen programmatically callingwatchmust be specified asnew TestPathPatterns(patterns), whereTestPathPatternscan be imported from@jest/pattern[jest-reporters, jest-runner]Unhandled errors without stack get correctly logged to console (#14619)[jest-util]Always loadmjsfiles withimport(#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 whereObjectContainingmatched non-object values. ([#15463])(#15463).
- Adds a
conditional/checkto ensure the argument passed toexpectis an object.- Add unit tests for new
ObjectContainingbehavior.- Remove
invalid/wrongtest case assertions forObjectContaining.[jest-worker]Addresses incorrect state on exit (#15610)Performance
[*][BREAKING] Bundle all of Jest's modules intoindex.js(#12348, #14550 & #14661)[jest-haste-map]Only spawn one process to check forwatchmaninstallation (#14826)[jest-runner]Better cleanupsource-map-supportafter test to resolve (minor) memory leak (#15233)[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(#15325CVE-2024-37890)[*]Increase version ofmicromatchto^4.0.7(#15082)[*][BREAKING] Drop support for Node.js versions 14, 16, 19, 21 and 23 (#14460, #15118, #15623, #15640)[*][BREAKING] Drop support fortypescript@4.3, minimum version is now5.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 toglob@10(#14509)[*]UseTypeErroroverErrorwhere appropriate (#14799)[docs]Fix typos inCHANGELOG.mdandpackages/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/coreto^7.11(#14109)[babel-jest, @jest/transform]Updatebabel-plugin-istanbulto v6 (#15156)[babel-plugin-jest-hoist]Move unnecessarydependenciestodevDependencies(#15010)[expect][BREAKING] Remove.toBeCalled(),.toBeCalledTimes(),.toBeCalledWith(),.lastCalledWith(),.nthCalledWith(),.toReturn(),.toReturnTimes(),.toReturnWith(),.lastReturnedWith(),.nthReturnedWith()and.toThrowError()matcher aliases (#14632)[jest-cli, jest-config, @jest/types][BREAKING] Remove deprecated--initargument (#14490)[jest-config, @jest/core, jest-util]Upgradeci-info(#14655)[jest-mock][BREAKING] RemoveMockFunctionMetadataType,MockFunctionMetadataandSpyInstancetypes (#14621)[@jest/reporters]Upgradeistanbul-lib-source-maps(#14924)[jest-schemas]Upgrade@sinclair/typebox(#14775)[jest-transform]Upgradewrite-file-atomic(#14274)[jest-util]Upgradepicomatchto v4 (#14653 & #14885)[docs] Append to NODE_OPTIONS, not overwrite ([#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)See the CHANGELOG.
Does any of this look wrong? Please let us know.
Commits
See the full diff on Github. The new version differs by more commits than we can show here.
↗️ jest-resolve (indirect, 29.7.0 → 30.2.0) · Repo · Changelog
Release Notes
30.2.0
Chore & Maintenance
[*]Update example repo for testing React Native projects (#15832)[*]Updatejest-watch-typeaheadto v3 (#15830)Features
[jest-environment-jsdom-abstract]Add support for JSDOM v27 (#15834)Fixes
30.1.3
Fixes
- Fix
unstable_mockModulewithnode:prefixed core modules.
30.1.0
Features
[jest-leak-detector]Configurable GC aggressiveness regarding to V8 heap snapshot generation (#15793)[jest-runtime]Reduce redundant ReferenceError messages[jest-core]Include test modules that failed to load when --onlyFailures is activeFixes
- `[jest-snapshot-utils] Fix deprecated goo.gl snapshot guide link not getting replaced with fully canonical URL (#15787)
[jest-circus]Fixit.concurrentnot working withdescribe.skip(#15765)[jest-snapshot]Fix mangled inline snapshot updates when used with Prettier 3 and CRLF line endings[jest-runtime]Importing from@jest/globalsin more than one file no longer breaks relative paths (#15772)Chore
[expect]Update docblock fortoContain()to display info on substring check (#15789)
30.0.5 (from changelog)
Features
[jest-config]AllowtestMatchto take a string value[jest-worker]LetworkerIdleMemoryLimitaccept 0 to always restart worker child processesFixes
[expect]Fixbiginterror (#15702)
30.0.2
What's Changed
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)Full Changelog: https://github.com/jestjs/jest/blob/main/CHANGELOG.md
30.0.1
What's Changed
Features
[jest-resolver]Implement thedefaultAsyncResolver(#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 deprecatejest-replpackage (#15673)[jest-resolver]Replace customisBuiltinModulewith node'sisBuiltin(#15685)New Contributors
Full Changelog: https://github.com/jestjs/jest/blob/main/CHANGELOG.md
30.0.0
Today we are happy to announce the release of Jest 30. This release features a substantial number of changes, fixes, and improvements. While it is one of the largest major releases of Jest ever, we admit that three years for a major release is too long. In the future, we are aiming to make more frequent major releases to keep Jest great for the next decade.
If you want to skip all the news and just get going, run
npm install jest@^30.0.0and follow the migration guide: Upgrading from Jest 29 to 30.Features
[*]RenamedglobalsCleanupModetoglobalsCleanupand--waitNextEventLoopTurnForUnhandledRejectionEventsto--waitForUnhandledRejections[expect]AddArrayOfasymmetric matcher for validating array elements. (#15567)[babel-jest]Add optionexcludeJestPresetto allow opting out ofbabel-preset-jest(#15164)[expect]Revert #15038 to fixexpect(fn).toHaveBeenCalledWith(expect.objectContaining(...))when there are multiple calls (#15508)[jest-circus, jest-cli, jest-config]AddwaitNextEventLoopTurnForUnhandledRejectionEventsflag to minimise performance impact of correct detection of unhandled promise rejections introduced in #14315 (#14681)[jest-circus]Add awaitBeforeRetryoption tojest.retryTimes(#14738)[jest-circus]Add aretryImmediatelyoption tojest.retryTimes(#14696)[jest-circus, jest-jasmine2]AllowsetupFilesAfterEnvto export an async function (#10962)[jest-circus, jest-test-result]AddstartedAttimestamp inTestCaseResultObjectwithinonTestCaseResult(#15145)[jest-cli]ExportbuildArgv(#15310)[jest-config][BREAKING] Addmtsandctsto defaultmoduleFileExtensionsconfig (#14369)[jest-config][BREAKING] UpdatetestMatchandtestRegexdefault option for supportingmjs,cjs,mts, andcts(#14584)[jest-config]Loads config file from provided path inpackage.json(#14044)[jest-config]Allow loadingjest.config.ctsfiles (#14070)[jest-config]ShowrootDirin error message when apresetfails to load (#15194)[jest-config]Support loading TS config files usingesbuild-registervia 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]AddperfStatsto surface test setup overhead (#14622)[@jest/core][BREAKING] Changed--filterto accept an object with shape{ filtered: Array<string> }to match documentation (#13319)[@jest/core]Support--outputFileoption for--listTests(#14980)[@jest/core]Stringify Errors properly with--jsonflag (#15329)[@jest/core, @jest/test-sequencer][BREAKING] ExposesglobalConfig&contextstoTestSequencer(#14535, & #14543)[jest-each]Introduce%$option to add number of the test to its title (#14710)[@jest/environment][BREAKING] Remove deprecatedjest.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 thejsdomenvironment, allowing usage of custom versions of JSDOM (#14717)[jest-environment-node]Update jest environment with dispose symbolsSymbol(#14888 & #14909)[expect, @jest/expect][BREAKING] Add type inference for function parameters inCalledWithassertions (#15129)[@jest/expect-utils]Properly compare all types ofTypedArrays (#15178)[@jest/fake-timers][BREAKING] Upgrade@sinonjs/fake-timersto v13 (#14544 & #15470)[@jest/fake-timers]Exposing new modern timers functionadvanceTimersToFrame()which advances all timers by the needed milliseconds to execute callbacks currently scheduled withrequestAnimationFrame(#14598)[jest-matcher-utils]AddSERIALIZABLE_PROPERTIESto allow custom serialization of objects (#14893)[jest-mock]Add support for the Explicit Resource Management proposal to use theusingkeyword withjest.spyOn(object, methodName)(#14895)[jest-reporters]Add support for DEC mode 2026 (#15008)[jest-resolver]Supportfile://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 functionjest.advanceTimersToFrame()from@jest/fake-timers(#14598)[jest-runtime]Supportimport.meta.filenameandimport.meta.dirname(available from Node 20.11) (#14854)[jest-runtime]Supportimport.meta.resolve(#14930)[jest-runtime][BREAKING] Make it mandatory to passglobalConfigto theRuntimeconstructor (#15044)[jest-runtime]Addunstable_unmockModule(#15080)[jest-runtime]AddonGenerateMocktransformer callback for auto generated callbacks (#15433 & #15482)[jest-runtime][BREAKING] Usevm.compileFunctionovervm.Script(#15461)[@jest/schemas]Upgrade@sinclair/typeboxto v0.34 (#15450)[@jest/types]test.each(): Accept a readonly (as const) table properly (#14565)[@jest/types]Improve argument type inference passed totestanddescribecallback functions fromeachtables (#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 fromjest-snapshotinto its own package (#15095)[pretty-format][BREAKING] Do not render empty string children ('') in React plugin (#14470)Fixes
[expect]ShowAggregateErrorto display (#15346)[*]Replaceexitwithexit-x(#15399)[babel-plugin-jest-hoist]Usedenylistinstead of the deprecatedblacklistfor Babel 8 support (#14109)[babel-plugin-jest-hoist]Do not rely on buggy Babel behaviour (#15415)[expect]Check error instance type fortoThrow/toThrowError(#14576)[expect]Improve diff for failingexpect.objectContaining(#15038)[expect]UseArray.isArrayto check if an array is anArray(#15101)[expect]Fix Errorcauseassertion errors (#15339)[jest-changed-files]Print underlying errors when VCS commands fail (#15052)[jest-changed-files]Abortsl rootcall if output resembles a steam locomotive (#15053)[jest-circus][BREAKING] Prevent false test failures caused by promise rejections handled asynchronously (#14315)[jest-circus]Replace recursivemakeTestResultsimplementation with iterative one (#14760)[jest-circus]Omitexpect.hasAssertions()errors if a test already has errors (#14866)[jest-circus, jest-expect, jest-snapshot]Passtest.failingtests 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 respectrunInBandoption (#14578)[jest-config]SupporttestTimeoutin project config (#14697)[jest-config]SupportcoverageReportersin project config (#14697)[jest-config]Allowreportersin project config (#14768)[jest-config]Allow Node16/NodeNext/BundlermoduleResolutionin project's tsconfig (#14739)[@jest/create-cache-key-function]Correct the return type ofcreateCacheKey(#15159)[jest-each]Allow$keypathtemplates withnullorundefinedvalues (#14831)[@jest/expect-utils]Fix comparison ofDataView(#14408)[@jest/expect-utils][BREAKING] exclude non-enumerable in object matching (#14670)[@jest/expect-utils]Fix comparison ofURL(#14672)[@jest/expect-utils]CheckSymbolproperties 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 multiplehasteImplModulePaths (#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_importCoreModelso required core module is consistent if modified while loading (#15077)[jest-schemas, jest-types][BREAKING] Fix type oftestFailureExitCodeconfig option(#15232)[jest-util]Make sureisInteractiveworks in a browser (#14552)[pretty-format][BREAKING] PrintArrayBufferandDataViewcorrectly (#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
testPathPatternconfiguration option totestPathPatterns, which now takes a list of patterns instead of the regex.- [BREAKING]
--testPathPatternis now--testPathPatterns- [BREAKING] Specifying
testPathPatternswhen programmatically callingwatchmust be specified asnew TestPathPatterns(patterns), whereTestPathPatternscan be imported from@jest/pattern[jest-reporters, jest-runner]Unhandled errors without stack get correctly logged to console (#14619)[jest-util]Always loadmjsfiles withimport(#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 whereObjectContainingmatched non-object values. ([#15463])(#15463).
- Adds a
conditional/checkto ensure the argument passed toexpectis an object.- Add unit tests for new
ObjectContainingbehavior.- Remove
invalid/wrongtest case assertions forObjectContaining.[jest-worker]Addresses incorrect state on exit (#15610)Performance
[*][BREAKING] Bundle all of Jest's modules intoindex.js(#12348, #14550 & #14661)[jest-haste-map]Only spawn one process to check forwatchmaninstallation (#14826)[jest-runner]Better cleanupsource-map-supportafter test to resolve (minor) memory leak (#15233)[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(#15325CVE-2024-37890)[*]Increase version ofmicromatchto^4.0.7(#15082)[*][BREAKING] Drop support for Node.js versions 14, 16, 19, 21 and 23 (#14460, #15118, #15623, #15640)[*][BREAKING] Drop support fortypescript@4.3, minimum version is now5.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 toglob@10(#14509)[*]UseTypeErroroverErrorwhere appropriate (#14799)[docs]Fix typos inCHANGELOG.mdandpackages/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/coreto^7.11(#14109)[babel-jest, @jest/transform]Updatebabel-plugin-istanbulto v6 (#15156)[babel-plugin-jest-hoist]Move unnecessarydependenciestodevDependencies(#15010)[expect][BREAKING] Remove.toBeCalled(),.toBeCalledTimes(),.toBeCalledWith(),.lastCalledWith(),.nthCalledWith(),.toReturn(),.toReturnTimes(),.toReturnWith(),.lastReturnedWith(),.nthReturnedWith()and.toThrowError()matcher aliases (#14632)[jest-cli, jest-config, @jest/types][BREAKING] Remove deprecated--initargument (#14490)[jest-config, @jest/core, jest-util]Upgradeci-info(#14655)[jest-mock][BREAKING] RemoveMockFunctionMetadataType,MockFunctionMetadataandSpyInstancetypes (#14621)[@jest/reporters]Upgradeistanbul-lib-source-maps(#14924)[jest-schemas]Upgrade@sinclair/typebox(#14775)[jest-transform]Upgradewrite-file-atomic(#14274)[jest-util]Upgradepicomatchto v4 (#14653 & #14885)[docs] Append to NODE_OPTIONS, not overwrite ([#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)See the CHANGELOG.
Does any of this look wrong? Please let us know.
Commits
See the full diff on Github. The new version differs by more commits than we can show here.
↗️ jest-resolve-dependencies (indirect, 29.7.0 → 30.2.0) · Repo · Changelog
Release Notes
30.2.0
Chore & Maintenance
[*]Update example repo for testing React Native projects (#15832)[*]Updatejest-watch-typeaheadto v3 (#15830)Features
[jest-environment-jsdom-abstract]Add support for JSDOM v27 (#15834)Fixes
30.1.3
Fixes
- Fix
unstable_mockModulewithnode:prefixed core modules.
30.1.2 (from changelog)
Fixes
[jest-snapshot-utils]Correct snapshot header regexp to work with newline across OSes (#15803)
30.1.1
Fixes
[jest-snapshot-utils]Fix deprecated goo.gl snapshot warning not handling Windows end-of-line sequences (#15800)
30.1.0
Features
[jest-leak-detector]Configurable GC aggressiveness regarding to V8 heap snapshot generation (#15793)[jest-runtime]Reduce redundant ReferenceError messages[jest-core]Include test modules that failed to load when --onlyFailures is activeFixes
- `[jest-snapshot-utils] Fix deprecated goo.gl snapshot guide link not getting replaced with fully canonical URL (#15787)
[jest-circus]Fixit.concurrentnot working withdescribe.skip(#15765)[jest-snapshot]Fix mangled inline snapshot updates when used with Prettier 3 and CRLF line endings[jest-runtime]Importing from@jest/globalsin more than one file no longer breaks relative paths (#15772)Chore
[expect]Update docblock fortoContain()to display info on substring check (#15789)
30.0.5 (from changelog)
Features
[jest-config]AllowtestMatchto take a string value[jest-worker]LetworkerIdleMemoryLimitaccept 0 to always restart worker child processesFixes
[expect]Fixbiginterror (#15702)
30.0.4 (from changelog)
Features
[expect]TheInversetype is now exported (#15714)[expect]feat: supportasync functionsintoBe(#15704)Fixes
30.0.3 (from changelog)
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)
30.0.2
What's Changed
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)Full Changelog: https://github.com/jestjs/jest/blob/main/CHANGELOG.md
30.0.1
What's Changed
Features
[jest-resolver]Implement thedefaultAsyncResolver(#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 deprecatejest-replpackage (#15673)[jest-resolver]Replace customisBuiltinModulewith node'sisBuiltin(#15685)New Contributors
Full Changelog: https://github.com/jestjs/jest/blob/main/CHANGELOG.md
30.0.0
Today we are happy to announce the release of Jest 30. This release features a substantial number of changes, fixes, and improvements. While it is one of the largest major releases of Jest ever, we admit that three years for a major release is too long. In the future, we are aiming to make more frequent major releases to keep Jest great for the next decade.
If you want to skip all the news and just get going, run
npm install jest@^30.0.0and follow the migration guide: Upgrading from Jest 29 to 30.Features
[*]RenamedglobalsCleanupModetoglobalsCleanupand--waitNextEventLoopTurnForUnhandledRejectionEventsto--waitForUnhandledRejections[expect]AddArrayOfasymmetric matcher for validating array elements. (#15567)[babel-jest]Add optionexcludeJestPresetto allow opting out ofbabel-preset-jest(#15164)[expect]Revert #15038 to fixexpect(fn).toHaveBeenCalledWith(expect.objectContaining(...))when there are multiple calls (#15508)[jest-circus, jest-cli, jest-config]AddwaitNextEventLoopTurnForUnhandledRejectionEventsflag to minimise performance impact of correct detection of unhandled promise rejections introduced in #14315 (#14681)[jest-circus]Add awaitBeforeRetryoption tojest.retryTimes(#14738)[jest-circus]Add aretryImmediatelyoption tojest.retryTimes(#14696)[jest-circus, jest-jasmine2]AllowsetupFilesAfterEnvto export an async function (#10962)[jest-circus, jest-test-result]AddstartedAttimestamp inTestCaseResultObjectwithinonTestCaseResult(#15145)[jest-cli]ExportbuildArgv(#15310)[jest-config][BREAKING] Addmtsandctsto defaultmoduleFileExtensionsconfig (#14369)[jest-config][BREAKING] UpdatetestMatchandtestRegexdefault option for supportingmjs,cjs,mts, andcts(#14584)[jest-config]Loads config file from provided path inpackage.json(#14044)[jest-config]Allow loadingjest.config.ctsfiles (#14070)[jest-config]ShowrootDirin error message when apresetfails to load (#15194)[jest-config]Support loading TS config files usingesbuild-registervia 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]AddperfStatsto surface test setup overhead (#14622)[@jest/core][BREAKING] Changed--filterto accept an object with shape{ filtered: Array<string> }to match documentation (#13319)[@jest/core]Support--outputFileoption for--listTests(#14980)[@jest/core]Stringify Errors properly with--jsonflag (#15329)[@jest/core, @jest/test-sequencer][BREAKING] ExposesglobalConfig&contextstoTestSequencer(#14535, & #14543)[jest-each]Introduce%$option to add number of the test to its title (#14710)[@jest/environment][BREAKING] Remove deprecatedjest.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 thejsdomenvironment, allowing usage of custom versions of JSDOM (#14717)[jest-environment-node]Update jest environment with dispose symbolsSymbol(#14888 & #14909)[expect, @jest/expect][BREAKING] Add type inference for function parameters inCalledWithassertions (#15129)[@jest/expect-utils]Properly compare all types ofTypedArrays (#15178)[@jest/fake-timers][BREAKING] Upgrade@sinonjs/fake-timersto v13 (#14544 & #15470)[@jest/fake-timers]Exposing new modern timers functionadvanceTimersToFrame()which advances all timers by the needed milliseconds to execute callbacks currently scheduled withrequestAnimationFrame(#14598)[jest-matcher-utils]AddSERIALIZABLE_PROPERTIESto allow custom serialization of objects (#14893)[jest-mock]Add support for the Explicit Resource Management proposal to use theusingkeyword withjest.spyOn(object, methodName)(#14895)[jest-reporters]Add support for DEC mode 2026 (#15008)[jest-resolver]Supportfile://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 functionjest.advanceTimersToFrame()from@jest/fake-timers(#14598)[jest-runtime]Supportimport.meta.filenameandimport.meta.dirname(available from Node 20.11) (#14854)[jest-runtime]Supportimport.meta.resolve(#14930)[jest-runtime][BREAKING] Make it mandatory to passglobalConfigto theRuntimeconstructor (#15044)[jest-runtime]Addunstable_unmockModule(#15080)[jest-runtime]AddonGenerateMocktransformer callback for auto generated callbacks (#15433 & #15482)[jest-runtime][BREAKING] Usevm.compileFunctionovervm.Script(#15461)[@jest/schemas]Upgrade@sinclair/typeboxto v0.34 (#15450)[@jest/types]test.each(): Accept a readonly (as const) table properly (#14565)[@jest/types]Improve argument type inference passed totestanddescribecallback functions fromeachtables (#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 fromjest-snapshotinto its own package (#15095)[pretty-format][BREAKING] Do not render empty string children ('') in React plugin (#14470)Fixes
[expect]ShowAggregateErrorto display (#15346)[*]Replaceexitwithexit-x(#15399)[babel-plugin-jest-hoist]Usedenylistinstead of the deprecatedblacklistfor Babel 8 support (#14109)[babel-plugin-jest-hoist]Do not rely on buggy Babel behaviour (#15415)[expect]Check error instance type fortoThrow/toThrowError(#14576)[expect]Improve diff for failingexpect.objectContaining(#15038)[expect]UseArray.isArrayto check if an array is anArray(#15101)[expect]Fix Errorcauseassertion errors (#15339)[jest-changed-files]Print underlying errors when VCS commands fail (#15052)[jest-changed-files]Abortsl rootcall if output resembles a steam locomotive (#15053)[jest-circus][BREAKING] Prevent false test failures caused by promise rejections handled asynchronously (#14315)[jest-circus]Replace recursivemakeTestResultsimplementation with iterative one (#14760)[jest-circus]Omitexpect.hasAssertions()errors if a test already has errors (#14866)[jest-circus, jest-expect, jest-snapshot]Passtest.failingtests 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 respectrunInBandoption (#14578)[jest-config]SupporttestTimeoutin project config (#14697)[jest-config]SupportcoverageReportersin project config (#14697)[jest-config]Allowreportersin project config (#14768)[jest-config]Allow Node16/NodeNext/BundlermoduleResolutionin project's tsconfig (#14739)[@jest/create-cache-key-function]Correct the return type ofcreateCacheKey(#15159)[jest-each]Allow$keypathtemplates withnullorundefinedvalues (#14831)[@jest/expect-utils]Fix comparison ofDataView(#14408)[@jest/expect-utils][BREAKING] exclude non-enumerable in object matching (#14670)[@jest/expect-utils]Fix comparison ofURL(#14672)[@jest/expect-utils]CheckSymbolproperties 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 multiplehasteImplModulePaths (#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_importCoreModelso required core module is consistent if modified while loading (#15077)[jest-schemas, jest-types][BREAKING] Fix type oftestFailureExitCodeconfig option(#15232)[jest-util]Make sureisInteractiveworks in a browser (#14552)[pretty-format][BREAKING] PrintArrayBufferandDataViewcorrectly (#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
testPathPatternconfiguration option totestPathPatterns, which now takes a list of patterns instead of the regex.- [BREAKING]
--testPathPatternis now--testPathPatterns- [BREAKING] Specifying
testPathPatternswhen programmatically callingwatchmust be specified asnew TestPathPatterns(patterns), whereTestPathPatternscan be imported from@jest/pattern[jest-reporters, jest-runner]Unhandled errors without stack get correctly logged to console (#14619)[jest-util]Always loadmjsfiles withimport(#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 whereObjectContainingmatched non-object values. ([#15463])(#15463).
- Adds a
conditional/checkto ensure the argument passed toexpectis an object.- Add unit tests for new
ObjectContainingbehavior.- Remove
invalid/wrongtest case assertions forObjectContaining.[jest-worker]Addresses incorrect state on exit (#15610)Performance
[*][BREAKING] Bundle all of Jest's modules intoindex.js(#12348, #14550 & #14661)[jest-haste-map]Only spawn one process to check forwatchmaninstallation (#14826)[jest-runner]Better cleanupsource-map-supportafter test to resolve (minor) memory leak (#15233)[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(#15325CVE-2024-37890)[*]Increase version ofmicromatchto^4.0.7(#15082)[*][BREAKING] Drop support for Node.js versions 14, 16, 19, 21 and 23 (#14460, #15118, #15623, #15640)[*][BREAKING] Drop support fortypescript@4.3, minimum version is now5.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 toglob@10(#14509)[*]UseTypeErroroverErrorwhere appropriate (#14799)[docs]Fix typos inCHANGELOG.mdandpackages/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/coreto^7.11(#14109)[babel-jest, @jest/transform]Updatebabel-plugin-istanbulto v6 (#15156)[babel-plugin-jest-hoist]Move unnecessarydependenciestodevDependencies(#15010)[expect][BREAKING] Remove.toBeCalled(),.toBeCalledTimes(),.toBeCalledWith(),.lastCalledWith(),.nthCalledWith(),.toReturn(),.toReturnTimes(),.toReturnWith(),.lastReturnedWith(),.nthReturnedWith()and.toThrowError()matcher aliases (#14632)[jest-cli, jest-config, @jest/types][BREAKING] Remove deprecated--initargument (#14490)[jest-config, @jest/core, jest-util]Upgradeci-info(#14655)[jest-mock][BREAKING] RemoveMockFunctionMetadataType,MockFunctionMetadataandSpyInstancetypes (#14621)[@jest/reporters]Upgradeistanbul-lib-source-maps(#14924)[jest-schemas]Upgrade@sinclair/typebox(#14775)[jest-transform]Upgradewrite-file-atomic(#14274)[jest-util]Upgradepicomatchto v4 (#14653 & #14885)[docs] Append to NODE_OPTIONS, not overwrite ([#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)See the CHANGELOG.
Does any of this look wrong? Please let us know.
Commits
See the full diff on Github. The new version differs by more commits than we can show here.
↗️ jest-runner (indirect, 29.7.0 → 30.2.0) · Repo · Changelog
Release Notes
30.2.0
Chore & Maintenance
[*]Update example repo for testing React Native projects (#15832)[*]Updatejest-watch-typeaheadto v3 (#15830)Features
[jest-environment-jsdom-abstract]Add support for JSDOM v27 (#15834)Fixes
30.1.3
Fixes
- Fix
unstable_mockModulewithnode:prefixed core modules.
30.1.2 (from changelog)
Fixes
[jest-snapshot-utils]Correct snapshot header regexp to work with newline across OSes (#15803)
30.1.1
Fixes
[jest-snapshot-utils]Fix deprecated goo.gl snapshot warning not handling Windows end-of-line sequences (#15800)
30.1.0
Features
[jest-leak-detector]Configurable GC aggressiveness regarding to V8 heap snapshot generation (#15793)[jest-runtime]Reduce redundant ReferenceError messages[jest-core]Include test modules that failed to load when --onlyFailures is activeFixes
- `[jest-snapshot-utils] Fix deprecated goo.gl snapshot guide link not getting replaced with fully canonical URL (#15787)
[jest-circus]Fixit.concurrentnot working withdescribe.skip(#15765)[jest-snapshot]Fix mangled inline snapshot updates when used with Prettier 3 and CRLF line endings[jest-runtime]Importing from@jest/globalsin more than one file no longer breaks relative paths (#15772)Chore
[expect]Update docblock fortoContain()to display info on substring check (#15789)
30.0.5 (from changelog)
Features
[jest-config]AllowtestMatchto take a string value[jest-worker]LetworkerIdleMemoryLimitaccept 0 to always restart worker child processesFixes
[expect]Fixbiginterror (#15702)
30.0.4 (from changelog)
Features
[expect]TheInversetype is now exported (#15714)[expect]feat: supportasync functionsintoBe(#15704)Fixes
30.0.3 (from changelog)
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)
30.0.2
What's Changed
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)Full Changelog: https://github.com/jestjs/jest/blob/main/CHANGELOG.md
30.0.1
What's Changed
Features
[jest-resolver]Implement thedefaultAsyncResolver(#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 deprecatejest-replpackage (#15673)[jest-resolver]Replace customisBuiltinModulewith node'sisBuiltin(#15685)New Contributors
Full Changelog: https://github.com/jestjs/jest/blob/main/CHANGELOG.md
30.0.0
Today we are happy to announce the release of Jest 30. This release features a substantial number of changes, fixes, and improvements. While it is one of the largest major releases of Jest ever, we admit that three years for a major release is too long. In the future, we are aiming to make more frequent major releases to keep Jest great for the next decade.
If you want to skip all the news and just get going, run
npm install jest@^30.0.0and follow the migration guide: Upgrading from Jest 29 to 30.Features
[*]RenamedglobalsCleanupModetoglobalsCleanupand--waitNextEventLoopTurnForUnhandledRejectionEventsto--waitForUnhandledRejections[expect]AddArrayOfasymmetric matcher for validating array elements. (#15567)[babel-jest]Add optionexcludeJestPresetto allow opting out ofbabel-preset-jest(#15164)[expect]Revert #15038 to fixexpect(fn).toHaveBeenCalledWith(expect.objectContaining(...))when there are multiple calls (#15508)[jest-circus, jest-cli, jest-config]AddwaitNextEventLoopTurnForUnhandledRejectionEventsflag to minimise performance impact of correct detection of unhandled promise rejections introduced in #14315 (#14681)[jest-circus]Add awaitBeforeRetryoption tojest.retryTimes(#14738)[jest-circus]Add aretryImmediatelyoption tojest.retryTimes(#14696)[jest-circus, jest-jasmine2]AllowsetupFilesAfterEnvto export an async function (#10962)[jest-circus, jest-test-result]AddstartedAttimestamp inTestCaseResultObjectwithinonTestCaseResult(#15145)[jest-cli]ExportbuildArgv(#15310)[jest-config][BREAKING] Addmtsandctsto defaultmoduleFileExtensionsconfig (#14369)[jest-config][BREAKING] UpdatetestMatchandtestRegexdefault option for supportingmjs,cjs,mts, andcts(#14584)[jest-config]Loads config file from provided path inpackage.json(#14044)[jest-config]Allow loadingjest.config.ctsfiles (#14070)[jest-config]ShowrootDirin error message when apresetfails to load (#15194)[jest-config]Support loading TS config files usingesbuild-registervia 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]AddperfStatsto surface test setup overhead (#14622)[@jest/core][BREAKING] Changed--filterto accept an object with shape{ filtered: Array<string> }to match documentation (#13319)[@jest/core]Support--outputFileoption for--listTests(#14980)[@jest/core]Stringify Errors properly with--jsonflag (#15329)[@jest/core, @jest/test-sequencer][BREAKING] ExposesglobalConfig&contextstoTestSequencer(#14535, & #14543)[jest-each]Introduce%$option to add number of the test to its title (#14710)[@jest/environment][BREAKING] Remove deprecatedjest.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 thejsdomenvironment, allowing usage of custom versions of JSDOM (#14717)[jest-environment-node]Update jest environment with dispose symbolsSymbol(#14888 & #14909)[expect, @jest/expect][BREAKING] Add type inference for function parameters inCalledWithassertions (#15129)[@jest/expect-utils]Properly compare all types ofTypedArrays (#15178)[@jest/fake-timers][BREAKING] Upgrade@sinonjs/fake-timersto v13 (#14544 & #15470)[@jest/fake-timers]Exposing new modern timers functionadvanceTimersToFrame()which advances all timers by the needed milliseconds to execute callbacks currently scheduled withrequestAnimationFrame(#14598)[jest-matcher-utils]AddSERIALIZABLE_PROPERTIESto allow custom serialization of objects (#14893)[jest-mock]Add support for the Explicit Resource Management proposal to use theusingkeyword withjest.spyOn(object, methodName)(#14895)[jest-reporters]Add support for DEC mode 2026 (#15008)[jest-resolver]Supportfile://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 functionjest.advanceTimersToFrame()from@jest/fake-timers(#14598)[jest-runtime]Supportimport.meta.filenameandimport.meta.dirname(available from Node 20.11) (#14854)[jest-runtime]Supportimport.meta.resolve(#14930)[jest-runtime][BREAKING] Make it mandatory to passglobalConfigto theRuntimeconstructor (#15044)[jest-runtime]Addunstable_unmockModule(#15080)[jest-runtime]AddonGenerateMocktransformer callback for auto generated callbacks (#15433 & #15482)[jest-runtime][BREAKING] Usevm.compileFunctionovervm.Script(#15461)[@jest/schemas]Upgrade@sinclair/typeboxto v0.34 (#15450)[@jest/types]test.each(): Accept a readonly (as const) table properly (#14565)[@jest/types]Improve argument type inference passed totestanddescribecallback functions fromeachtables (#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 fromjest-snapshotinto its own package (#15095)[pretty-format][BREAKING] Do not render empty string children ('') in React plugin (#14470)Fixes
[expect]ShowAggregateErrorto display (#15346)[*]Replaceexitwithexit-x(#15399)[babel-plugin-jest-hoist]Usedenylistinstead of the deprecatedblacklistfor Babel 8 support (#14109)[babel-plugin-jest-hoist]Do not rely on buggy Babel behaviour (#15415)[expect]Check error instance type fortoThrow/toThrowError(#14576)[expect]Improve diff for failingexpect.objectContaining(#15038)[expect]UseArray.isArrayto check if an array is anArray(#15101)[expect]Fix Errorcauseassertion errors (#15339)[jest-changed-files]Print underlying errors when VCS commands fail (#15052)[jest-changed-files]Abortsl rootcall if output resembles a steam locomotive (#15053)[jest-circus][BREAKING] Prevent false test failures caused by promise rejections handled asynchronously (#14315)[jest-circus]Replace recursivemakeTestResultsimplementation with iterative one (#14760)[jest-circus]Omitexpect.hasAssertions()errors if a test already has errors (#14866)[jest-circus, jest-expect, jest-snapshot]Passtest.failingtests 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 respectrunInBandoption (#14578)[jest-config]SupporttestTimeoutin project config (#14697)[jest-config]SupportcoverageReportersin project config (#14697)[jest-config]Allowreportersin project config (#14768)[jest-config]Allow Node16/NodeNext/BundlermoduleResolutionin project's tsconfig (#14739)[@jest/create-cache-key-function]Correct the return type ofcreateCacheKey(#15159)[jest-each]Allow$keypathtemplates withnullorundefinedvalues (#14831)[@jest/expect-utils]Fix comparison ofDataView(#14408)[@jest/expect-utils][BREAKING] exclude non-enumerable in object matching (#14670)[@jest/expect-utils]Fix comparison ofURL(#14672)[@jest/expect-utils]CheckSymbolproperties 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 multiplehasteImplModulePaths (#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_importCoreModelso required core module is consistent if modified while loading (#15077)[jest-schemas, jest-types][BREAKING] Fix type oftestFailureExitCodeconfig option(#15232)[jest-util]Make sureisInteractiveworks in a browser (#14552)[pretty-format][BREAKING] PrintArrayBufferandDataViewcorrectly (#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
testPathPatternconfiguration option totestPathPatterns, which now takes a list of patterns instead of the regex.- [BREAKING]
--testPathPatternis now--testPathPatterns- [BREAKING] Specifying
testPathPatternswhen programmatically callingwatchmust be specified asnew TestPathPatterns(patterns), whereTestPathPatternscan be imported from@jest/pattern[jest-reporters, jest-runner]Unhandled errors without stack get correctly logged to console (#14619)[jest-util]Always loadmjsfiles withimport(#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 whereObjectContainingmatched non-object values. ([#15463])(#15463).
- Adds a
conditional/checkto ensure the argument passed toexpectis an object.- Add unit tests for new
ObjectContainingbehavior.- Remove
invalid/wrongtest case assertions forObjectContaining.[jest-worker]Addresses incorrect state on exit (#15610)Performance
[*][BREAKING] Bundle all of Jest's modules intoindex.js(#12348, #14550 & #14661)[jest-haste-map]Only spawn one process to check forwatchmaninstallation (#14826)[jest-runner]Better cleanupsource-map-supportafter test to resolve (minor) memory leak (#15233)[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(#15325CVE-2024-37890)[*]Increase version ofmicromatchto^4.0.7(#15082)[*][BREAKING] Drop support for Node.js versions 14, 16, 19, 21 and 23 (#14460, #15118, #15623, #15640)[*][BREAKING] Drop support fortypescript@4.3, minimum version is now5.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 toglob@10(#14509)[*]UseTypeErroroverErrorwhere appropriate (#14799)[docs]Fix typos inCHANGELOG.mdandpackages/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/coreto^7.11(#14109)[babel-jest, @jest/transform]Updatebabel-plugin-istanbulto v6 (#15156)[babel-plugin-jest-hoist]Move unnecessarydependenciestodevDependencies(#15010)[expect][BREAKING] Remove.toBeCalled(),.toBeCalledTimes(),.toBeCalledWith(),.lastCalledWith(),.nthCalledWith(),.toReturn(),.toReturnTimes(),.toReturnWith(),.lastReturnedWith(),.nthReturnedWith()and.toThrowError()matcher aliases (#14632)[jest-cli, jest-config, @jest/types][BREAKING] Remove deprecated--initargument (#14490)[jest-config, @jest/core, jest-util]Upgradeci-info(#14655)[jest-mock][BREAKING] RemoveMockFunctionMetadataType,MockFunctionMetadataandSpyInstancetypes (#14621)[@jest/reporters]Upgradeistanbul-lib-source-maps(#14924)[jest-schemas]Upgrade@sinclair/typebox(#14775)[jest-transform]Upgradewrite-file-atomic(#14274)[jest-util]Upgradepicomatchto v4 (#14653 & #14885)[docs] Append to NODE_OPTIONS, not overwrite ([#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)See the CHANGELOG.
Does any of this look wrong? Please let us know.
Commits
See the full diff on Github. The new version differs by more commits than we can show here.
↗️ jest-runtime (indirect, 29.7.0 → 30.2.0) · Repo · Changelog
Release Notes
30.2.0
Chore & Maintenance
[*]Update example repo for testing React Native projects (#15832)[*]Updatejest-watch-typeaheadto v3 (#15830)Features
[jest-environment-jsdom-abstract]Add support for JSDOM v27 (#15834)Fixes
30.1.3
Fixes
- Fix
unstable_mockModulewithnode:prefixed core modules.
30.1.2 (from changelog)
Fixes
[jest-snapshot-utils]Correct snapshot header regexp to work with newline across OSes (#15803)
30.1.1
Fixes
[jest-snapshot-utils]Fix deprecated goo.gl snapshot warning not handling Windows end-of-line sequences (#15800)
30.1.0
Features
[jest-leak-detector]Configurable GC aggressiveness regarding to V8 heap snapshot generation (#15793)[jest-runtime]Reduce redundant ReferenceError messages[jest-core]Include test modules that failed to load when --onlyFailures is activeFixes
- `[jest-snapshot-utils] Fix deprecated goo.gl snapshot guide link not getting replaced with fully canonical URL (#15787)
[jest-circus]Fixit.concurrentnot working withdescribe.skip(#15765)[jest-snapshot]Fix mangled inline snapshot updates when used with Prettier 3 and CRLF line endings[jest-runtime]Importing from@jest/globalsin more than one file no longer breaks relative paths (#15772)Chore
[expect]Update docblock fortoContain()to display info on substring check (#15789)
30.0.5 (from changelog)
Features
[jest-config]AllowtestMatchto take a string value[jest-worker]LetworkerIdleMemoryLimitaccept 0 to always restart worker child processesFixes
[expect]Fixbiginterror (#15702)
30.0.4 (from changelog)
Features
[expect]TheInversetype is now exported (#15714)[expect]feat: supportasync functionsintoBe(#15704)Fixes
30.0.3 (from changelog)
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)
30.0.2
What's Changed
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)Full Changelog: https://github.com/jestjs/jest/blob/main/CHANGELOG.md
30.0.1
What's Changed
Features
[jest-resolver]Implement thedefaultAsyncResolver(#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 deprecatejest-replpackage (#15673)[jest-resolver]Replace customisBuiltinModulewith node'sisBuiltin(#15685)New Contributors
Full Changelog: https://github.com/jestjs/jest/blob/main/CHANGELOG.md
30.0.0
Today we are happy to announce the release of Jest 30. This release features a substantial number of changes, fixes, and improvements. While it is one of the largest major releases of Jest ever, we admit that three years for a major release is too long. In the future, we are aiming to make more frequent major releases to keep Jest great for the next decade.
If you want to skip all the news and just get going, run
npm install jest@^30.0.0and follow the migration guide: Upgrading from Jest 29 to 30.Features
[*]RenamedglobalsCleanupModetoglobalsCleanupand--waitNextEventLoopTurnForUnhandledRejectionEventsto--waitForUnhandledRejections[expect]AddArrayOfasymmetric matcher for validating array elements. (#15567)[babel-jest]Add optionexcludeJestPresetto allow opting out ofbabel-preset-jest(#15164)[expect]Revert #15038 to fixexpect(fn).toHaveBeenCalledWith(expect.objectContaining(...))when there are multiple calls (#15508)[jest-circus, jest-cli, jest-config]AddwaitNextEventLoopTurnForUnhandledRejectionEventsflag to minimise performance impact of correct detection of unhandled promise rejections introduced in #14315 (#14681)[jest-circus]Add awaitBeforeRetryoption tojest.retryTimes(#14738)[jest-circus]Add aretryImmediatelyoption tojest.retryTimes(#14696)[jest-circus, jest-jasmine2]AllowsetupFilesAfterEnvto export an async function (#10962)[jest-circus, jest-test-result]AddstartedAttimestamp inTestCaseResultObjectwithinonTestCaseResult(#15145)[jest-cli]ExportbuildArgv(#15310)[jest-config][BREAKING] Addmtsandctsto defaultmoduleFileExtensionsconfig (#14369)[jest-config][BREAKING] UpdatetestMatchandtestRegexdefault option for supportingmjs,cjs,mts, andcts(#14584)[jest-config]Loads config file from provided path inpackage.json(#14044)[jest-config]Allow loadingjest.config.ctsfiles (#14070)[jest-config]ShowrootDirin error message when apresetfails to load (#15194)[jest-config]Support loading TS config files usingesbuild-registervia 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]AddperfStatsto surface test setup overhead (#14622)[@jest/core][BREAKING] Changed--filterto accept an object with shape{ filtered: Array<string> }to match documentation (#13319)[@jest/core]Support--outputFileoption for--listTests(#14980)[@jest/core]Stringify Errors properly with--jsonflag (#15329)[@jest/core, @jest/test-sequencer][BREAKING] ExposesglobalConfig&contextstoTestSequencer(#14535, & #14543)[jest-each]Introduce%$option to add number of the test to its title (#14710)[@jest/environment][BREAKING] Remove deprecatedjest.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 thejsdomenvironment, allowing usage of custom versions of JSDOM (#14717)[jest-environment-node]Update jest environment with dispose symbolsSymbol(#14888 & #14909)[expect, @jest/expect][BREAKING] Add type inference for function parameters inCalledWithassertions (#15129)[@jest/expect-utils]Properly compare all types ofTypedArrays (#15178)[@jest/fake-timers][BREAKING] Upgrade@sinonjs/fake-timersto v13 (#14544 & #15470)[@jest/fake-timers]Exposing new modern timers functionadvanceTimersToFrame()which advances all timers by the needed milliseconds to execute callbacks currently scheduled withrequestAnimationFrame(#14598)[jest-matcher-utils]AddSERIALIZABLE_PROPERTIESto allow custom serialization of objects (#14893)[jest-mock]Add support for the Explicit Resource Management proposal to use theusingkeyword withjest.spyOn(object, methodName)(#14895)[jest-reporters]Add support for DEC mode 2026 (#15008)[jest-resolver]Supportfile://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 functionjest.advanceTimersToFrame()from@jest/fake-timers(#14598)[jest-runtime]Supportimport.meta.filenameandimport.meta.dirname(available from Node 20.11) (#14854)[jest-runtime]Supportimport.meta.resolve(#14930)[jest-runtime][BREAKING] Make it mandatory to passglobalConfigto theRuntimeconstructor (#15044)[jest-runtime]Addunstable_unmockModule(#15080)[jest-runtime]AddonGenerateMocktransformer callback for auto generated callbacks (#15433 & #15482)[jest-runtime][BREAKING] Usevm.compileFunctionovervm.Script(#15461)[@jest/schemas]Upgrade@sinclair/typeboxto v0.34 (#15450)[@jest/types]test.each(): Accept a readonly (as const) table properly (#14565)[@jest/types]Improve argument type inference passed totestanddescribecallback functions fromeachtables (#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 fromjest-snapshotinto its own package (#15095)[pretty-format][BREAKING] Do not render empty string children ('') in React plugin (#14470)Fixes
[expect]ShowAggregateErrorto display (#15346)[*]Replaceexitwithexit-x(#15399)[babel-plugin-jest-hoist]Usedenylistinstead of the deprecatedblacklistfor Babel 8 support (#14109)[babel-plugin-jest-hoist]Do not rely on buggy Babel behaviour (#15415)[expect]Check error instance type fortoThrow/toThrowError(#14576)[expect]Improve diff for failingexpect.objectContaining(#15038)[expect]UseArray.isArrayto check if an array is anArray(#15101)[expect]Fix Errorcauseassertion errors (#15339)[jest-changed-files]Print underlying errors when VCS commands fail (#15052)[jest-changed-files]Abortsl rootcall if output resembles a steam locomotive (#15053)[jest-circus][BREAKING] Prevent false test failures caused by promise rejections handled asynchronously (#14315)[jest-circus]Replace recursivemakeTestResultsimplementation with iterative one (#14760)[jest-circus]Omitexpect.hasAssertions()errors if a test already has errors (#14866)[jest-circus, jest-expect, jest-snapshot]Passtest.failingtests 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 respectrunInBandoption (#14578)[jest-config]SupporttestTimeoutin project config (#14697)[jest-config]SupportcoverageReportersin project config (#14697)[jest-config]Allowreportersin project config (#14768)[jest-config]Allow Node16/NodeNext/BundlermoduleResolutionin project's tsconfig (#14739)[@jest/create-cache-key-function]Correct the return type ofcreateCacheKey(#15159)[jest-each]Allow$keypathtemplates withnullorundefinedvalues (#14831)[@jest/expect-utils]Fix comparison ofDataView(#14408)[@jest/expect-utils][BREAKING] exclude non-enumerable in object matching (#14670)[@jest/expect-utils]Fix comparison ofURL(#14672)[@jest/expect-utils]CheckSymbolproperties 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 multiplehasteImplModulePaths (#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_importCoreModelso required core module is consistent if modified while loading (#15077)[jest-schemas, jest-types][BREAKING] Fix type oftestFailureExitCodeconfig option(#15232)[jest-util]Make sureisInteractiveworks in a browser (#14552)[pretty-format][BREAKING] PrintArrayBufferandDataViewcorrectly (#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
testPathPatternconfiguration option totestPathPatterns, which now takes a list of patterns instead of the regex.- [BREAKING]
--testPathPatternis now--testPathPatterns- [BREAKING] Specifying
testPathPatternswhen programmatically callingwatchmust be specified asnew TestPathPatterns(patterns), whereTestPathPatternscan be imported from@jest/pattern[jest-reporters, jest-runner]Unhandled errors without stack get correctly logged to console (#14619)[jest-util]Always loadmjsfiles withimport(#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 whereObjectContainingmatched non-object values. ([#15463])(#15463).
- Adds a
conditional/checkto ensure the argument passed toexpectis an object.- Add unit tests for new
ObjectContainingbehavior.- Remove
invalid/wrongtest case assertions forObjectContaining.[jest-worker]Addresses incorrect state on exit (#15610)Performance
[*][BREAKING] Bundle all of Jest's modules intoindex.js(#12348, #14550 & #14661)[jest-haste-map]Only spawn one process to check forwatchmaninstallation (#14826)[jest-runner]Better cleanupsource-map-supportafter test to resolve (minor) memory leak (#15233)[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(#15325CVE-2024-37890)[*]Increase version ofmicromatchto^4.0.7(#15082)[*][BREAKING] Drop support for Node.js versions 14, 16, 19, 21 and 23 (#14460, #15118, #15623, #15640)[*][BREAKING] Drop support fortypescript@4.3, minimum version is now5.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 toglob@10(#14509)[*]UseTypeErroroverErrorwhere appropriate (#14799)[docs]Fix typos inCHANGELOG.mdandpackages/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/coreto^7.11(#14109)[babel-jest, @jest/transform]Updatebabel-plugin-istanbulto v6 (#15156)[babel-plugin-jest-hoist]Move unnecessarydependenciestodevDependencies(#15010)[expect][BREAKING] Remove.toBeCalled(),.toBeCalledTimes(),.toBeCalledWith(),.lastCalledWith(),.nthCalledWith(),.toReturn(),.toReturnTimes(),.toReturnWith(),.lastReturnedWith(),.nthReturnedWith()and.toThrowError()matcher aliases (#14632)[jest-cli, jest-config, @jest/types][BREAKING] Remove deprecated--initargument (#14490)[jest-config, @jest/core, jest-util]Upgradeci-info(#14655)[jest-mock][BREAKING] RemoveMockFunctionMetadataType,MockFunctionMetadataandSpyInstancetypes (#14621)[@jest/reporters]Upgradeistanbul-lib-source-maps(#14924)[jest-schemas]Upgrade@sinclair/typebox(#14775)[jest-transform]Upgradewrite-file-atomic(#14274)[jest-util]Upgradepicomatchto v4 (#14653 & #14885)[docs] Append to NODE_OPTIONS, not overwrite ([#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)See the CHANGELOG.
Does any of this look wrong? Please let us know.
Commits
See the full diff on Github. The new version differs by more commits than we can show here.
↗️ jest-snapshot (indirect, 29.7.0 → 30.2.0) · Repo · Changelog
Release Notes
30.2.0
Chore & Maintenance
[*]Update example repo for testing React Native projects (#15832)[*]Updatejest-watch-typeaheadto v3 (#15830)Features
[jest-environment-jsdom-abstract]Add support for JSDOM v27 (#15834)Fixes
30.1.1
Fixes
[jest-snapshot-utils]Fix deprecated goo.gl snapshot warning not handling Windows end-of-line sequences (#15800)
30.1.0
Features
[jest-leak-detector]Configurable GC aggressiveness regarding to V8 heap snapshot generation (#15793)[jest-runtime]Reduce redundant ReferenceError messages[jest-core]Include test modules that failed to load when --onlyFailures is activeFixes
- `[jest-snapshot-utils] Fix deprecated goo.gl snapshot guide link not getting replaced with fully canonical URL (#15787)
[jest-circus]Fixit.concurrentnot working withdescribe.skip(#15765)[jest-snapshot]Fix mangled inline snapshot updates when used with Prettier 3 and CRLF line endings[jest-runtime]Importing from@jest/globalsin more than one file no longer breaks relative paths (#15772)Chore
[expect]Update docblock fortoContain()to display info on substring check (#15789)
30.0.5 (from changelog)
Features
[jest-config]AllowtestMatchto take a string value[jest-worker]LetworkerIdleMemoryLimitaccept 0 to always restart worker child processesFixes
[expect]Fixbiginterror (#15702)
30.0.4 (from changelog)
Features
[expect]TheInversetype is now exported (#15714)[expect]feat: supportasync functionsintoBe(#15704)Fixes
30.0.3 (from changelog)
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)
30.0.2
What's Changed
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)Full Changelog: https://github.com/jestjs/jest/blob/main/CHANGELOG.md
30.0.1
What's Changed
Features
[jest-resolver]Implement thedefaultAsyncResolver(#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 deprecatejest-replpackage (#15673)[jest-resolver]Replace customisBuiltinModulewith node'sisBuiltin(#15685)New Contributors
Full Changelog: https://github.com/jestjs/jest/blob/main/CHANGELOG.md
30.0.0
Today we are happy to announce the release of Jest 30. This release features a substantial number of changes, fixes, and improvements. While it is one of the largest major releases of Jest ever, we admit that three years for a major release is too long. In the future, we are aiming to make more frequent major releases to keep Jest great for the next decade.
If you want to skip all the news and just get going, run
npm install jest@^30.0.0and follow the migration guide: Upgrading from Jest 29 to 30.Features
[*]RenamedglobalsCleanupModetoglobalsCleanupand--waitNextEventLoopTurnForUnhandledRejectionEventsto--waitForUnhandledRejections[expect]AddArrayOfasymmetric matcher for validating array elements. (#15567)[babel-jest]Add optionexcludeJestPresetto allow opting out ofbabel-preset-jest(#15164)[expect]Revert #15038 to fixexpect(fn).toHaveBeenCalledWith(expect.objectContaining(...))when there are multiple calls (#15508)[jest-circus, jest-cli, jest-config]AddwaitNextEventLoopTurnForUnhandledRejectionEventsflag to minimise performance impact of correct detection of unhandled promise rejections introduced in #14315 (#14681)[jest-circus]Add awaitBeforeRetryoption tojest.retryTimes(#14738)[jest-circus]Add aretryImmediatelyoption tojest.retryTimes(#14696)[jest-circus, jest-jasmine2]AllowsetupFilesAfterEnvto export an async function (#10962)[jest-circus, jest-test-result]AddstartedAttimestamp inTestCaseResultObjectwithinonTestCaseResult(#15145)[jest-cli]ExportbuildArgv(#15310)[jest-config][BREAKING] Addmtsandctsto defaultmoduleFileExtensionsconfig (#14369)[jest-config][BREAKING] UpdatetestMatchandtestRegexdefault option for supportingmjs,cjs,mts, andcts(#14584)[jest-config]Loads config file from provided path inpackage.json(#14044)[jest-config]Allow loadingjest.config.ctsfiles (#14070)[jest-config]ShowrootDirin error message when apresetfails to load (#15194)[jest-config]Support loading TS config files usingesbuild-registervia 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]AddperfStatsto surface test setup overhead (#14622)[@jest/core][BREAKING] Changed--filterto accept an object with shape{ filtered: Array<string> }to match documentation (#13319)[@jest/core]Support--outputFileoption for--listTests(#14980)[@jest/core]Stringify Errors properly with--jsonflag (#15329)[@jest/core, @jest/test-sequencer][BREAKING] ExposesglobalConfig&contextstoTestSequencer(#14535, & #14543)[jest-each]Introduce%$option to add number of the test to its title (#14710)[@jest/environment][BREAKING] Remove deprecatedjest.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 thejsdomenvironment, allowing usage of custom versions of JSDOM (#14717)[jest-environment-node]Update jest environment with dispose symbolsSymbol(#14888 & #14909)[expect, @jest/expect][BREAKING] Add type inference for function parameters inCalledWithassertions (#15129)[@jest/expect-utils]Properly compare all types ofTypedArrays (#15178)[@jest/fake-timers][BREAKING] Upgrade@sinonjs/fake-timersto v13 (#14544 & #15470)[@jest/fake-timers]Exposing new modern timers functionadvanceTimersToFrame()which advances all timers by the needed milliseconds to execute callbacks currently scheduled withrequestAnimationFrame(#14598)[jest-matcher-utils]AddSERIALIZABLE_PROPERTIESto allow custom serialization of objects (#14893)[jest-mock]Add support for the Explicit Resource Management proposal to use theusingkeyword withjest.spyOn(object, methodName)(#14895)[jest-reporters]Add support for DEC mode 2026 (#15008)[jest-resolver]Supportfile://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 functionjest.advanceTimersToFrame()from@jest/fake-timers(#14598)[jest-runtime]Supportimport.meta.filenameandimport.meta.dirname(available from Node 20.11) (#14854)[jest-runtime]Supportimport.meta.resolve(#14930)[jest-runtime][BREAKING] Make it mandatory to passglobalConfigto theRuntimeconstructor (#15044)[jest-runtime]Addunstable_unmockModule(#15080)[jest-runtime]AddonGenerateMocktransformer callback for auto generated callbacks (#15433 & #15482)[jest-runtime][BREAKING] Usevm.compileFunctionovervm.Script(#15461)[@jest/schemas]Upgrade@sinclair/typeboxto v0.34 (#15450)[@jest/types]test.each(): Accept a readonly (as const) table properly (#14565)[@jest/types]Improve argument type inference passed totestanddescribecallback functions fromeachtables (#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 fromjest-snapshotinto its own package (#15095)[pretty-format][BREAKING] Do not render empty string children ('') in React plugin (#14470)Fixes
[expect]ShowAggregateErrorto display (#15346)[*]Replaceexitwithexit-x(#15399)[babel-plugin-jest-hoist]Usedenylistinstead of the deprecatedblacklistfor Babel 8 support (#14109)[babel-plugin-jest-hoist]Do not rely on buggy Babel behaviour (#15415)[expect]Check error instance type fortoThrow/toThrowError(#14576)[expect]Improve diff for failingexpect.objectContaining(#15038)[expect]UseArray.isArrayto check if an array is anArray(#15101)[expect]Fix Errorcauseassertion errors (#15339)[jest-changed-files]Print underlying errors when VCS commands fail (#15052)[jest-changed-files]Abortsl rootcall if output resembles a steam locomotive (#15053)[jest-circus][BREAKING] Prevent false test failures caused by promise rejections handled asynchronously (#14315)[jest-circus]Replace recursivemakeTestResultsimplementation with iterative one (#14760)[jest-circus]Omitexpect.hasAssertions()errors if a test already has errors (#14866)[jest-circus, jest-expect, jest-snapshot]Passtest.failingtests 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 respectrunInBandoption (#14578)[jest-config]SupporttestTimeoutin project config (#14697)[jest-config]SupportcoverageReportersin project config (#14697)[jest-config]Allowreportersin project config (#14768)[jest-config]Allow Node16/NodeNext/BundlermoduleResolutionin project's tsconfig (#14739)[@jest/create-cache-key-function]Correct the return type ofcreateCacheKey(#15159)[jest-each]Allow$keypathtemplates withnullorundefinedvalues (#14831)[@jest/expect-utils]Fix comparison ofDataView(#14408)[@jest/expect-utils][BREAKING] exclude non-enumerable in object matching (#14670)[@jest/expect-utils]Fix comparison ofURL(#14672)[@jest/expect-utils]CheckSymbolproperties 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 multiplehasteImplModulePaths (#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_importCoreModelso required core module is consistent if modified while loading (#15077)[jest-schemas, jest-types][BREAKING] Fix type oftestFailureExitCodeconfig option(#15232)[jest-util]Make sureisInteractiveworks in a browser (#14552)[pretty-format][BREAKING] PrintArrayBufferandDataViewcorrectly (#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
testPathPatternconfiguration option totestPathPatterns, which now takes a list of patterns instead of the regex.- [BREAKING]
--testPathPatternis now--testPathPatterns- [BREAKING] Specifying
testPathPatternswhen programmatically callingwatchmust be specified asnew TestPathPatterns(patterns), whereTestPathPatternscan be imported from@jest/pattern[jest-reporters, jest-runner]Unhandled errors without stack get correctly logged to console (#14619)[jest-util]Always loadmjsfiles withimport(#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 whereObjectContainingmatched non-object values. ([#15463])(#15463).
- Adds a
conditional/checkto ensure the argument passed toexpectis an object.- Add unit tests for new
ObjectContainingbehavior.- Remove
invalid/wrongtest case assertions forObjectContaining.[jest-worker]Addresses incorrect state on exit (#15610)Performance
[*][BREAKING] Bundle all of Jest's modules intoindex.js(#12348, #14550 & #14661)[jest-haste-map]Only spawn one process to check forwatchmaninstallation (#14826)[jest-runner]Better cleanupsource-map-supportafter test to resolve (minor) memory leak (#15233)[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(#15325CVE-2024-37890)[*]Increase version ofmicromatchto^4.0.7(#15082)[*][BREAKING] Drop support for Node.js versions 14, 16, 19, 21 and 23 (#14460, #15118, #15623, #15640)[*][BREAKING] Drop support fortypescript@4.3, minimum version is now5.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 toglob@10(#14509)[*]UseTypeErroroverErrorwhere appropriate (#14799)[docs]Fix typos inCHANGELOG.mdandpackages/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/coreto^7.11(#14109)[babel-jest, @jest/transform]Updatebabel-plugin-istanbulto v6 (#15156)[babel-plugin-jest-hoist]Move unnecessarydependenciestodevDependencies(#15010)[expect][BREAKING] Remove.toBeCalled(),.toBeCalledTimes(),.toBeCalledWith(),.lastCalledWith(),.nthCalledWith(),.toReturn(),.toReturnTimes(),.toReturnWith(),.lastReturnedWith(),.nthReturnedWith()and.toThrowError()matcher aliases (#14632)[jest-cli, jest-config, @jest/types][BREAKING] Remove deprecated--initargument (#14490)[jest-config, @jest/core, jest-util]Upgradeci-info(#14655)[jest-mock][BREAKING] RemoveMockFunctionMetadataType,MockFunctionMetadataandSpyInstancetypes (#14621)[@jest/reporters]Upgradeistanbul-lib-source-maps(#14924)[jest-schemas]Upgrade@sinclair/typebox(#14775)[jest-transform]Upgradewrite-file-atomic(#14274)[jest-util]Upgradepicomatchto v4 (#14653 & #14885)[docs] Append to NODE_OPTIONS, not overwrite ([#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)See the CHANGELOG.
Does any of this look wrong? Please let us know.
Commits
See the full diff on Github. The new version differs by more commits than we can show here.
↗️ jest-util (indirect, 29.7.0 → 30.2.0) · Repo · Changelog
Release Notes
30.2.0
Chore & Maintenance
[*]Update example repo for testing React Native projects (#15832)[*]Updatejest-watch-typeaheadto v3 (#15830)Features
[jest-environment-jsdom-abstract]Add support for JSDOM v27 (#15834)Fixes
30.0.5 (from changelog)
Features
[jest-config]AllowtestMatchto take a string value[jest-worker]LetworkerIdleMemoryLimitaccept 0 to always restart worker child processesFixes
[expect]Fixbiginterror (#15702)
30.0.2
What's Changed
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)Full Changelog: https://github.com/jestjs/jest/blob/main/CHANGELOG.md
30.0.1
What's Changed
Features
[jest-resolver]Implement thedefaultAsyncResolver(#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 deprecatejest-replpackage (#15673)[jest-resolver]Replace customisBuiltinModulewith node'sisBuiltin(#15685)New Contributors
Full Changelog: https://github.com/jestjs/jest/blob/main/CHANGELOG.md
30.0.0
Today we are happy to announce the release of Jest 30. This release features a substantial number of changes, fixes, and improvements. While it is one of the largest major releases of Jest ever, we admit that three years for a major release is too long. In the future, we are aiming to make more frequent major releases to keep Jest great for the next decade.
If you want to skip all the news and just get going, run
npm install jest@^30.0.0and follow the migration guide: Upgrading from Jest 29 to 30.Features
[*]RenamedglobalsCleanupModetoglobalsCleanupand--waitNextEventLoopTurnForUnhandledRejectionEventsto--waitForUnhandledRejections[expect]AddArrayOfasymmetric matcher for validating array elements. (#15567)[babel-jest]Add optionexcludeJestPresetto allow opting out ofbabel-preset-jest(#15164)[expect]Revert #15038 to fixexpect(fn).toHaveBeenCalledWith(expect.objectContaining(...))when there are multiple calls (#15508)[jest-circus, jest-cli, jest-config]AddwaitNextEventLoopTurnForUnhandledRejectionEventsflag to minimise performance impact of correct detection of unhandled promise rejections introduced in #14315 (#14681)[jest-circus]Add awaitBeforeRetryoption tojest.retryTimes(#14738)[jest-circus]Add aretryImmediatelyoption tojest.retryTimes(#14696)[jest-circus, jest-jasmine2]AllowsetupFilesAfterEnvto export an async function (#10962)[jest-circus, jest-test-result]AddstartedAttimestamp inTestCaseResultObjectwithinonTestCaseResult(#15145)[jest-cli]ExportbuildArgv(#15310)[jest-config][BREAKING] Addmtsandctsto defaultmoduleFileExtensionsconfig (#14369)[jest-config][BREAKING] UpdatetestMatchandtestRegexdefault option for supportingmjs,cjs,mts, andcts(#14584)[jest-config]Loads config file from provided path inpackage.json(#14044)[jest-config]Allow loadingjest.config.ctsfiles (#14070)[jest-config]ShowrootDirin error message when apresetfails to load (#15194)[jest-config]Support loading TS config files usingesbuild-registervia 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]AddperfStatsto surface test setup overhead (#14622)[@jest/core][BREAKING] Changed--filterto accept an object with shape{ filtered: Array<string> }to match documentation (#13319)[@jest/core]Support--outputFileoption for--listTests(#14980)[@jest/core]Stringify Errors properly with--jsonflag (#15329)[@jest/core, @jest/test-sequencer][BREAKING] ExposesglobalConfig&contextstoTestSequencer(#14535, & #14543)[jest-each]Introduce%$option to add number of the test to its title (#14710)[@jest/environment][BREAKING] Remove deprecatedjest.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 thejsdomenvironment, allowing usage of custom versions of JSDOM (#14717)[jest-environment-node]Update jest environment with dispose symbolsSymbol(#14888 & #14909)[expect, @jest/expect][BREAKING] Add type inference for function parameters inCalledWithassertions (#15129)[@jest/expect-utils]Properly compare all types ofTypedArrays (#15178)[@jest/fake-timers][BREAKING] Upgrade@sinonjs/fake-timersto v13 (#14544 & #15470)[@jest/fake-timers]Exposing new modern timers functionadvanceTimersToFrame()which advances all timers by the needed milliseconds to execute callbacks currently scheduled withrequestAnimationFrame(#14598)[jest-matcher-utils]AddSERIALIZABLE_PROPERTIESto allow custom serialization of objects (#14893)[jest-mock]Add support for the Explicit Resource Management proposal to use theusingkeyword withjest.spyOn(object, methodName)(#14895)[jest-reporters]Add support for DEC mode 2026 (#15008)[jest-resolver]Supportfile://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 functionjest.advanceTimersToFrame()from@jest/fake-timers(#14598)[jest-runtime]Supportimport.meta.filenameandimport.meta.dirname(available from Node 20.11) (#14854)[jest-runtime]Supportimport.meta.resolve(#14930)[jest-runtime][BREAKING] Make it mandatory to passglobalConfigto theRuntimeconstructor (#15044)[jest-runtime]Addunstable_unmockModule(#15080)[jest-runtime]AddonGenerateMocktransformer callback for auto generated callbacks (#15433 & #15482)[jest-runtime][BREAKING] Usevm.compileFunctionovervm.Script(#15461)[@jest/schemas]Upgrade@sinclair/typeboxto v0.34 (#15450)[@jest/types]test.each(): Accept a readonly (as const) table properly (#14565)[@jest/types]Improve argument type inference passed totestanddescribecallback functions fromeachtables (#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 fromjest-snapshotinto its own package (#15095)[pretty-format][BREAKING] Do not render empty string children ('') in React plugin (#14470)Fixes
[expect]ShowAggregateErrorto display (#15346)[*]Replaceexitwithexit-x(#15399)[babel-plugin-jest-hoist]Usedenylistinstead of the deprecatedblacklistfor Babel 8 support (#14109)[babel-plugin-jest-hoist]Do not rely on buggy Babel behaviour (#15415)[expect]Check error instance type fortoThrow/toThrowError(#14576)[expect]Improve diff for failingexpect.objectContaining(#15038)[expect]UseArray.isArrayto check if an array is anArray(#15101)[expect]Fix Errorcauseassertion errors (#15339)[jest-changed-files]Print underlying errors when VCS commands fail (#15052)[jest-changed-files]Abortsl rootcall if output resembles a steam locomotive (#15053)[jest-circus][BREAKING] Prevent false test failures caused by promise rejections handled asynchronously (#14315)[jest-circus]Replace recursivemakeTestResultsimplementation with iterative one (#14760)[jest-circus]Omitexpect.hasAssertions()errors if a test already has errors (#14866)[jest-circus, jest-expect, jest-snapshot]Passtest.failingtests 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 respectrunInBandoption (#14578)[jest-config]SupporttestTimeoutin project config (#14697)[jest-config]SupportcoverageReportersin project config (#14697)[jest-config]Allowreportersin project config (#14768)[jest-config]Allow Node16/NodeNext/BundlermoduleResolutionin project's tsconfig (#14739)[@jest/create-cache-key-function]Correct the return type ofcreateCacheKey(#15159)[jest-each]Allow$keypathtemplates withnullorundefinedvalues (#14831)[@jest/expect-utils]Fix comparison ofDataView(#14408)[@jest/expect-utils][BREAKING] exclude non-enumerable in object matching (#14670)[@jest/expect-utils]Fix comparison ofURL(#14672)[@jest/expect-utils]CheckSymbolproperties 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 multiplehasteImplModulePaths (#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_importCoreModelso required core module is consistent if modified while loading (#15077)[jest-schemas, jest-types][BREAKING] Fix type oftestFailureExitCodeconfig option(#15232)[jest-util]Make sureisInteractiveworks in a browser (#14552)[pretty-format][BREAKING] PrintArrayBufferandDataViewcorrectly (#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
testPathPatternconfiguration option totestPathPatterns, which now takes a list of patterns instead of the regex.- [BREAKING]
--testPathPatternis now--testPathPatterns- [BREAKING] Specifying
testPathPatternswhen programmatically callingwatchmust be specified asnew TestPathPatterns(patterns), whereTestPathPatternscan be imported from@jest/pattern[jest-reporters, jest-runner]Unhandled errors without stack get correctly logged to console (#14619)[jest-util]Always loadmjsfiles withimport(#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 whereObjectContainingmatched non-object values. ([#15463])(#15463).
- Adds a
conditional/checkto ensure the argument passed toexpectis an object.- Add unit tests for new
ObjectContainingbehavior.- Remove
invalid/wrongtest case assertions forObjectContaining.[jest-worker]Addresses incorrect state on exit (#15610)Performance
[*][BREAKING] Bundle all of Jest's modules intoindex.js(#12348, #14550 & #14661)[jest-haste-map]Only spawn one process to check forwatchmaninstallation (#14826)[jest-runner]Better cleanupsource-map-supportafter test to resolve (minor) memory leak (#15233)[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(#15325CVE-2024-37890)[*]Increase version ofmicromatchto^4.0.7(#15082)[*][BREAKING] Drop support for Node.js versions 14, 16, 19, 21 and 23 (#14460, #15118, #15623, #15640)[*][BREAKING] Drop support fortypescript@4.3, minimum version is now5.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 toglob@10(#14509)[*]UseTypeErroroverErrorwhere appropriate (#14799)[docs]Fix typos inCHANGELOG.mdandpackages/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/coreto^7.11(#14109)[babel-jest, @jest/transform]Updatebabel-plugin-istanbulto v6 (#15156)[babel-plugin-jest-hoist]Move unnecessarydependenciestodevDependencies(#15010)[expect][BREAKING] Remove.toBeCalled(),.toBeCalledTimes(),.toBeCalledWith(),.lastCalledWith(),.nthCalledWith(),.toReturn(),.toReturnTimes(),.toReturnWith(),.lastReturnedWith(),.nthReturnedWith()and.toThrowError()matcher aliases (#14632)[jest-cli, jest-config, @jest/types][BREAKING] Remove deprecated--initargument (#14490)[jest-config, @jest/core, jest-util]Upgradeci-info(#14655)[jest-mock][BREAKING] RemoveMockFunctionMetadataType,MockFunctionMetadataandSpyInstancetypes (#14621)[@jest/reporters]Upgradeistanbul-lib-source-maps(#14924)[jest-schemas]Upgrade@sinclair/typebox(#14775)[jest-transform]Upgradewrite-file-atomic(#14274)[jest-util]Upgradepicomatchto v4 (#14653 & #14885)[docs] Append to NODE_OPTIONS, not overwrite ([#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)See the CHANGELOG.
Does any of this look wrong? Please let us know.
Commits
See the full diff on Github. The new version differs by more commits than we can show here.
↗️ jest-validate (indirect, 29.7.0 → 30.2.0) · Repo · Changelog
Release Notes
30.2.0
Chore & Maintenance
[*]Update example repo for testing React Native projects (#15832)[*]Updatejest-watch-typeaheadto v3 (#15830)Features
[jest-environment-jsdom-abstract]Add support for JSDOM v27 (#15834)Fixes
30.1.0
Features
[jest-leak-detector]Configurable GC aggressiveness regarding to V8 heap snapshot generation (#15793)[jest-runtime]Reduce redundant ReferenceError messages[jest-core]Include test modules that failed to load when --onlyFailures is activeFixes
- `[jest-snapshot-utils] Fix deprecated goo.gl snapshot guide link not getting replaced with fully canonical URL (#15787)
[jest-circus]Fixit.concurrentnot working withdescribe.skip(#15765)[jest-snapshot]Fix mangled inline snapshot updates when used with Prettier 3 and CRLF line endings[jest-runtime]Importing from@jest/globalsin more than one file no longer breaks relative paths (#15772)Chore
[expect]Update docblock fortoContain()to display info on substring check (#15789)
30.0.5 (from changelog)
Features
[jest-config]AllowtestMatchto take a string value[jest-worker]LetworkerIdleMemoryLimitaccept 0 to always restart worker child processesFixes
[expect]Fixbiginterror (#15702)
30.0.2
What's Changed
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)Full Changelog: https://github.com/jestjs/jest/blob/main/CHANGELOG.md
30.0.1
What's Changed
Features
[jest-resolver]Implement thedefaultAsyncResolver(#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 deprecatejest-replpackage (#15673)[jest-resolver]Replace customisBuiltinModulewith node'sisBuiltin(#15685)New Contributors
Full Changelog: https://github.com/jestjs/jest/blob/main/CHANGELOG.md
30.0.0
Today we are happy to announce the release of Jest 30. This release features a substantial number of changes, fixes, and improvements. While it is one of the largest major releases of Jest ever, we admit that three years for a major release is too long. In the future, we are aiming to make more frequent major releases to keep Jest great for the next decade.
If you want to skip all the news and just get going, run
npm install jest@^30.0.0and follow the migration guide: Upgrading from Jest 29 to 30.Features
[*]RenamedglobalsCleanupModetoglobalsCleanupand--waitNextEventLoopTurnForUnhandledRejectionEventsto--waitForUnhandledRejections[expect]AddArrayOfasymmetric matcher for validating array elements. (#15567)[babel-jest]Add optionexcludeJestPresetto allow opting out ofbabel-preset-jest(#15164)[expect]Revert #15038 to fixexpect(fn).toHaveBeenCalledWith(expect.objectContaining(...))when there are multiple calls (#15508)[jest-circus, jest-cli, jest-config]AddwaitNextEventLoopTurnForUnhandledRejectionEventsflag to minimise performance impact of correct detection of unhandled promise rejections introduced in #14315 (#14681)[jest-circus]Add awaitBeforeRetryoption tojest.retryTimes(#14738)[jest-circus]Add aretryImmediatelyoption tojest.retryTimes(#14696)[jest-circus, jest-jasmine2]AllowsetupFilesAfterEnvto export an async function (#10962)[jest-circus, jest-test-result]AddstartedAttimestamp inTestCaseResultObjectwithinonTestCaseResult(#15145)[jest-cli]ExportbuildArgv(#15310)[jest-config][BREAKING] Addmtsandctsto defaultmoduleFileExtensionsconfig (#14369)[jest-config][BREAKING] UpdatetestMatchandtestRegexdefault option for supportingmjs,cjs,mts, andcts(#14584)[jest-config]Loads config file from provided path inpackage.json(#14044)[jest-config]Allow loadingjest.config.ctsfiles (#14070)[jest-config]ShowrootDirin error message when apresetfails to load (#15194)[jest-config]Support loading TS config files usingesbuild-registervia 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]AddperfStatsto surface test setup overhead (#14622)[@jest/core][BREAKING] Changed--filterto accept an object with shape{ filtered: Array<string> }to match documentation (#13319)[@jest/core]Support--outputFileoption for--listTests(#14980)[@jest/core]Stringify Errors properly with--jsonflag (#15329)[@jest/core, @jest/test-sequencer][BREAKING] ExposesglobalConfig&contextstoTestSequencer(#14535, & #14543)[jest-each]Introduce%$option to add number of the test to its title (#14710)[@jest/environment][BREAKING] Remove deprecatedjest.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 thejsdomenvironment, allowing usage of custom versions of JSDOM (#14717)[jest-environment-node]Update jest environment with dispose symbolsSymbol(#14888 & #14909)[expect, @jest/expect][BREAKING] Add type inference for function parameters inCalledWithassertions (#15129)[@jest/expect-utils]Properly compare all types ofTypedArrays (#15178)[@jest/fake-timers][BREAKING] Upgrade@sinonjs/fake-timersto v13 (#14544 & #15470)[@jest/fake-timers]Exposing new modern timers functionadvanceTimersToFrame()which advances all timers by the needed milliseconds to execute callbacks currently scheduled withrequestAnimationFrame(#14598)[jest-matcher-utils]AddSERIALIZABLE_PROPERTIESto allow custom serialization of objects (#14893)[jest-mock]Add support for the Explicit Resource Management proposal to use theusingkeyword withjest.spyOn(object, methodName)(#14895)[jest-reporters]Add support for DEC mode 2026 (#15008)[jest-resolver]Supportfile://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 functionjest.advanceTimersToFrame()from@jest/fake-timers(#14598)[jest-runtime]Supportimport.meta.filenameandimport.meta.dirname(available from Node 20.11) (#14854)[jest-runtime]Supportimport.meta.resolve(#14930)[jest-runtime][BREAKING] Make it mandatory to passglobalConfigto theRuntimeconstructor (#15044)[jest-runtime]Addunstable_unmockModule(#15080)[jest-runtime]AddonGenerateMocktransformer callback for auto generated callbacks (#15433 & #15482)[jest-runtime][BREAKING] Usevm.compileFunctionovervm.Script(#15461)[@jest/schemas]Upgrade@sinclair/typeboxto v0.34 (#15450)[@jest/types]test.each(): Accept a readonly (as const) table properly (#14565)[@jest/types]Improve argument type inference passed totestanddescribecallback functions fromeachtables (#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 fromjest-snapshotinto its own package (#15095)[pretty-format][BREAKING] Do not render empty string children ('') in React plugin (#14470)Fixes
[expect]ShowAggregateErrorto display (#15346)[*]Replaceexitwithexit-x(#15399)[babel-plugin-jest-hoist]Usedenylistinstead of the deprecatedblacklistfor Babel 8 support (#14109)[babel-plugin-jest-hoist]Do not rely on buggy Babel behaviour (#15415)[expect]Check error instance type fortoThrow/toThrowError(#14576)[expect]Improve diff for failingexpect.objectContaining(#15038)[expect]UseArray.isArrayto check if an array is anArray(#15101)[expect]Fix Errorcauseassertion errors (#15339)[jest-changed-files]Print underlying errors when VCS commands fail (#15052)[jest-changed-files]Abortsl rootcall if output resembles a steam locomotive (#15053)[jest-circus][BREAKING] Prevent false test failures caused by promise rejections handled asynchronously (#14315)[jest-circus]Replace recursivemakeTestResultsimplementation with iterative one (#14760)[jest-circus]Omitexpect.hasAssertions()errors if a test already has errors (#14866)[jest-circus, jest-expect, jest-snapshot]Passtest.failingtests 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 respectrunInBandoption (#14578)[jest-config]SupporttestTimeoutin project config (#14697)[jest-config]SupportcoverageReportersin project config (#14697)[jest-config]Allowreportersin project config (#14768)[jest-config]Allow Node16/NodeNext/BundlermoduleResolutionin project's tsconfig (#14739)[@jest/create-cache-key-function]Correct the return type ofcreateCacheKey(#15159)[jest-each]Allow$keypathtemplates withnullorundefinedvalues (#14831)[@jest/expect-utils]Fix comparison ofDataView(#14408)[@jest/expect-utils][BREAKING] exclude non-enumerable in object matching (#14670)[@jest/expect-utils]Fix comparison ofURL(#14672)[@jest/expect-utils]CheckSymbolproperties 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 multiplehasteImplModulePaths (#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_importCoreModelso required core module is consistent if modified while loading (#15077)[jest-schemas, jest-types][BREAKING] Fix type oftestFailureExitCodeconfig option(#15232)[jest-util]Make sureisInteractiveworks in a browser (#14552)[pretty-format][BREAKING] PrintArrayBufferandDataViewcorrectly (#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
testPathPatternconfiguration option totestPathPatterns, which now takes a list of patterns instead of the regex.- [BREAKING]
--testPathPatternis now--testPathPatterns- [BREAKING] Specifying
testPathPatternswhen programmatically callingwatchmust be specified asnew TestPathPatterns(patterns), whereTestPathPatternscan be imported from@jest/pattern[jest-reporters, jest-runner]Unhandled errors without stack get correctly logged to console (#14619)[jest-util]Always loadmjsfiles withimport(#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 whereObjectContainingmatched non-object values. ([#15463])(#15463).
- Adds a
conditional/checkto ensure the argument passed toexpectis an object.- Add unit tests for new
ObjectContainingbehavior.- Remove
invalid/wrongtest case assertions forObjectContaining.[jest-worker]Addresses incorrect state on exit (#15610)Performance
[*][BREAKING] Bundle all of Jest's modules intoindex.js(#12348, #14550 & #14661)[jest-haste-map]Only spawn one process to check forwatchmaninstallation (#14826)[jest-runner]Better cleanupsource-map-supportafter test to resolve (minor) memory leak (#15233)[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(#15325CVE-2024-37890)[*]Increase version ofmicromatchto^4.0.7(#15082)[*][BREAKING] Drop support for Node.js versions 14, 16, 19, 21 and 23 (#14460, #15118, #15623, #15640)[*][BREAKING] Drop support fortypescript@4.3, minimum version is now5.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 toglob@10(#14509)[*]UseTypeErroroverErrorwhere appropriate (#14799)[docs]Fix typos inCHANGELOG.mdandpackages/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/coreto^7.11(#14109)[babel-jest, @jest/transform]Updatebabel-plugin-istanbulto v6 (#15156)[babel-plugin-jest-hoist]Move unnecessarydependenciestodevDependencies(#15010)[expect][BREAKING] Remove.toBeCalled(),.toBeCalledTimes(),.toBeCalledWith(),.lastCalledWith(),.nthCalledWith(),.toReturn(),.toReturnTimes(),.toReturnWith(),.lastReturnedWith(),.nthReturnedWith()and.toThrowError()matcher aliases (#14632)[jest-cli, jest-config, @jest/types][BREAKING] Remove deprecated--initargument (#14490)[jest-config, @jest/core, jest-util]Upgradeci-info(#14655)[jest-mock][BREAKING] RemoveMockFunctionMetadataType,MockFunctionMetadataandSpyInstancetypes (#14621)[@jest/reporters]Upgradeistanbul-lib-source-maps(#14924)[jest-schemas]Upgrade@sinclair/typebox(#14775)[jest-transform]Upgradewrite-file-atomic(#14274)[jest-util]Upgradepicomatchto v4 (#14653 & #14885)[docs] Append to NODE_OPTIONS, not overwrite ([#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)See the CHANGELOG.
Does any of this look wrong? Please let us know.
Commits
See the full diff on Github. The new version differs by more commits than we can show here.
↗️ jest-watcher (indirect, 29.7.0 → 30.2.0) · Repo · Changelog
Release Notes
30.2.0
Chore & Maintenance
[*]Update example repo for testing React Native projects (#15832)[*]Updatejest-watch-typeaheadto v3 (#15830)Features
[jest-environment-jsdom-abstract]Add support for JSDOM v27 (#15834)Fixes
30.1.3
Fixes
- Fix
unstable_mockModulewithnode:prefixed core modules.
30.1.2 (from changelog)
Fixes
[jest-snapshot-utils]Correct snapshot header regexp to work with newline across OSes (#15803)
30.1.1
Fixes
[jest-snapshot-utils]Fix deprecated goo.gl snapshot warning not handling Windows end-of-line sequences (#15800)
30.1.0
Features
[jest-leak-detector]Configurable GC aggressiveness regarding to V8 heap snapshot generation (#15793)[jest-runtime]Reduce redundant ReferenceError messages[jest-core]Include test modules that failed to load when --onlyFailures is activeFixes
- `[jest-snapshot-utils] Fix deprecated goo.gl snapshot guide link not getting replaced with fully canonical URL (#15787)
[jest-circus]Fixit.concurrentnot working withdescribe.skip(#15765)[jest-snapshot]Fix mangled inline snapshot updates when used with Prettier 3 and CRLF line endings[jest-runtime]Importing from@jest/globalsin more than one file no longer breaks relative paths (#15772)Chore
[expect]Update docblock fortoContain()to display info on substring check (#15789)
30.0.5 (from changelog)
Features
[jest-config]AllowtestMatchto take a string value[jest-worker]LetworkerIdleMemoryLimitaccept 0 to always restart worker child processesFixes
[expect]Fixbiginterror (#15702)
30.0.4 (from changelog)
Features
[expect]TheInversetype is now exported (#15714)[expect]feat: supportasync functionsintoBe(#15704)Fixes
30.0.2
What's Changed
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)Full Changelog: https://github.com/jestjs/jest/blob/main/CHANGELOG.md
30.0.1
What's Changed
Features
[jest-resolver]Implement thedefaultAsyncResolver(#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 deprecatejest-replpackage (#15673)[jest-resolver]Replace customisBuiltinModulewith node'sisBuiltin(#15685)New Contributors
Full Changelog: https://github.com/jestjs/jest/blob/main/CHANGELOG.md
30.0.0
Today we are happy to announce the release of Jest 30. This release features a substantial number of changes, fixes, and improvements. While it is one of the largest major releases of Jest ever, we admit that three years for a major release is too long. In the future, we are aiming to make more frequent major releases to keep Jest great for the next decade.
If you want to skip all the news and just get going, run
npm install jest@^30.0.0and follow the migration guide: Upgrading from Jest 29 to 30.Features
[*]RenamedglobalsCleanupModetoglobalsCleanupand--waitNextEventLoopTurnForUnhandledRejectionEventsto--waitForUnhandledRejections[expect]AddArrayOfasymmetric matcher for validating array elements. (#15567)[babel-jest]Add optionexcludeJestPresetto allow opting out ofbabel-preset-jest(#15164)[expect]Revert #15038 to fixexpect(fn).toHaveBeenCalledWith(expect.objectContaining(...))when there are multiple calls (#15508)[jest-circus, jest-cli, jest-config]AddwaitNextEventLoopTurnForUnhandledRejectionEventsflag to minimise performance impact of correct detection of unhandled promise rejections introduced in #14315 (#14681)[jest-circus]Add awaitBeforeRetryoption tojest.retryTimes(#14738)[jest-circus]Add aretryImmediatelyoption tojest.retryTimes(#14696)[jest-circus, jest-jasmine2]AllowsetupFilesAfterEnvto export an async function (#10962)[jest-circus, jest-test-result]AddstartedAttimestamp inTestCaseResultObjectwithinonTestCaseResult(#15145)[jest-cli]ExportbuildArgv(#15310)[jest-config][BREAKING] Addmtsandctsto defaultmoduleFileExtensionsconfig (#14369)[jest-config][BREAKING] UpdatetestMatchandtestRegexdefault option for supportingmjs,cjs,mts, andcts(#14584)[jest-config]Loads config file from provided path inpackage.json(#14044)[jest-config]Allow loadingjest.config.ctsfiles (#14070)[jest-config]ShowrootDirin error message when apresetfails to load (#15194)[jest-config]Support loading TS config files usingesbuild-registervia 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]AddperfStatsto surface test setup overhead (#14622)[@jest/core][BREAKING] Changed--filterto accept an object with shape{ filtered: Array<string> }to match documentation (#13319)[@jest/core]Support--outputFileoption for--listTests(#14980)[@jest/core]Stringify Errors properly with--jsonflag (#15329)[@jest/core, @jest/test-sequencer][BREAKING] ExposesglobalConfig&contextstoTestSequencer(#14535, & #14543)[jest-each]Introduce%$option to add number of the test to its title (#14710)[@jest/environment][BREAKING] Remove deprecatedjest.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 thejsdomenvironment, allowing usage of custom versions of JSDOM (#14717)[jest-environment-node]Update jest environment with dispose symbolsSymbol(#14888 & #14909)[expect, @jest/expect][BREAKING] Add type inference for function parameters inCalledWithassertions (#15129)[@jest/expect-utils]Properly compare all types ofTypedArrays (#15178)[@jest/fake-timers][BREAKING] Upgrade@sinonjs/fake-timersto v13 (#14544 & #15470)[@jest/fake-timers]Exposing new modern timers functionadvanceTimersToFrame()which advances all timers by the needed milliseconds to execute callbacks currently scheduled withrequestAnimationFrame(#14598)[jest-matcher-utils]AddSERIALIZABLE_PROPERTIESto allow custom serialization of objects (#14893)[jest-mock]Add support for the Explicit Resource Management proposal to use theusingkeyword withjest.spyOn(object, methodName)(#14895)[jest-reporters]Add support for DEC mode 2026 (#15008)[jest-resolver]Supportfile://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 functionjest.advanceTimersToFrame()from@jest/fake-timers(#14598)[jest-runtime]Supportimport.meta.filenameandimport.meta.dirname(available from Node 20.11) (#14854)[jest-runtime]Supportimport.meta.resolve(#14930)[jest-runtime][BREAKING] Make it mandatory to passglobalConfigto theRuntimeconstructor (#15044)[jest-runtime]Addunstable_unmockModule(#15080)[jest-runtime]AddonGenerateMocktransformer callback for auto generated callbacks (#15433 & #15482)[jest-runtime][BREAKING] Usevm.compileFunctionovervm.Script(#15461)[@jest/schemas]Upgrade@sinclair/typeboxto v0.34 (#15450)[@jest/types]test.each(): Accept a readonly (as const) table properly (#14565)[@jest/types]Improve argument type inference passed totestanddescribecallback functions fromeachtables (#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 fromjest-snapshotinto its own package (#15095)[pretty-format][BREAKING] Do not render empty string children ('') in React plugin (#14470)Fixes
[expect]ShowAggregateErrorto display (#15346)[*]Replaceexitwithexit-x(#15399)[babel-plugin-jest-hoist]Usedenylistinstead of the deprecatedblacklistfor Babel 8 support (#14109)[babel-plugin-jest-hoist]Do not rely on buggy Babel behaviour (#15415)[expect]Check error instance type fortoThrow/toThrowError(#14576)[expect]Improve diff for failingexpect.objectContaining(#15038)[expect]UseArray.isArrayto check if an array is anArray(#15101)[expect]Fix Errorcauseassertion errors (#15339)[jest-changed-files]Print underlying errors when VCS commands fail (#15052)[jest-changed-files]Abortsl rootcall if output resembles a steam locomotive (#15053)[jest-circus][BREAKING] Prevent false test failures caused by promise rejections handled asynchronously (#14315)[jest-circus]Replace recursivemakeTestResultsimplementation with iterative one (#14760)[jest-circus]Omitexpect.hasAssertions()errors if a test already has errors (#14866)[jest-circus, jest-expect, jest-snapshot]Passtest.failingtests 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 respectrunInBandoption (#14578)[jest-config]SupporttestTimeoutin project config (#14697)[jest-config]SupportcoverageReportersin project config (#14697)[jest-config]Allowreportersin project config (#14768)[jest-config]Allow Node16/NodeNext/BundlermoduleResolutionin project's tsconfig (#14739)[@jest/create-cache-key-function]Correct the return type ofcreateCacheKey(#15159)[jest-each]Allow$keypathtemplates withnullorundefinedvalues (#14831)[@jest/expect-utils]Fix comparison ofDataView(#14408)[@jest/expect-utils][BREAKING] exclude non-enumerable in object matching (#14670)[@jest/expect-utils]Fix comparison ofURL(#14672)[@jest/expect-utils]CheckSymbolproperties 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 multiplehasteImplModulePaths (#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_importCoreModelso required core module is consistent if modified while loading (#15077)[jest-schemas, jest-types][BREAKING] Fix type oftestFailureExitCodeconfig option(#15232)[jest-util]Make sureisInteractiveworks in a browser (#14552)[pretty-format][BREAKING] PrintArrayBufferandDataViewcorrectly (#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
testPathPatternconfiguration option totestPathPatterns, which now takes a list of patterns instead of the regex.- [BREAKING]
--testPathPatternis now--testPathPatterns- [BREAKING] Specifying
testPathPatternswhen programmatically callingwatchmust be specified asnew TestPathPatterns(patterns), whereTestPathPatternscan be imported from@jest/pattern[jest-reporters, jest-runner]Unhandled errors without stack get correctly logged to console (#14619)[jest-util]Always loadmjsfiles withimport(#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 whereObjectContainingmatched non-object values. ([#15463])(#15463).
- Adds a
conditional/checkto ensure the argument passed toexpectis an object.- Add unit tests for new
ObjectContainingbehavior.- Remove
invalid/wrongtest case assertions forObjectContaining.[jest-worker]Addresses incorrect state on exit (#15610)Performance
[*][BREAKING] Bundle all of Jest's modules intoindex.js(#12348, #14550 & #14661)[jest-haste-map]Only spawn one process to check forwatchmaninstallation (#14826)[jest-runner]Better cleanupsource-map-supportafter test to resolve (minor) memory leak (#15233)[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(#15325CVE-2024-37890)[*]Increase version ofmicromatchto^4.0.7(#15082)[*][BREAKING] Drop support for Node.js versions 14, 16, 19, 21 and 23 (#14460, #15118, #15623, #15640)[*][BREAKING] Drop support fortypescript@4.3, minimum version is now5.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 toglob@10(#14509)[*]UseTypeErroroverErrorwhere appropriate (#14799)[docs]Fix typos inCHANGELOG.mdandpackages/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/coreto^7.11(#14109)[babel-jest, @jest/transform]Updatebabel-plugin-istanbulto v6 (#15156)[babel-plugin-jest-hoist]Move unnecessarydependenciestodevDependencies(#15010)[expect][BREAKING] Remove.toBeCalled(),.toBeCalledTimes(),.toBeCalledWith(),.lastCalledWith(),.nthCalledWith(),.toReturn(),.toReturnTimes(),.toReturnWith(),.lastReturnedWith(),.nthReturnedWith()and.toThrowError()matcher aliases (#14632)[jest-cli, jest-config, @jest/types][BREAKING] Remove deprecated--initargument (#14490)[jest-config, @jest/core, jest-util]Upgradeci-info(#14655)[jest-mock][BREAKING] RemoveMockFunctionMetadataType,MockFunctionMetadataandSpyInstancetypes (#14621)[@jest/reporters]Upgradeistanbul-lib-source-maps(#14924)[jest-schemas]Upgrade@sinclair/typebox(#14775)[jest-transform]Upgradewrite-file-atomic(#14274)[jest-util]Upgradepicomatchto v4 (#14653 & #14885)[docs] Append to NODE_OPTIONS, not overwrite ([#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)See the CHANGELOG.
Does any of this look wrong? Please let us know.
Commits
See the full diff on Github. The new version differs by more commits than we can show here.
↗️ jest-worker (indirect, 29.7.0 → 30.2.0) · Repo · Changelog
Release Notes
30.2.0
Chore & Maintenance
[*]Update example repo for testing React Native projects (#15832)[*]Updatejest-watch-typeaheadto v3 (#15830)Features
[jest-environment-jsdom-abstract]Add support for JSDOM v27 (#15834)Fixes
30.1.0
Features
[jest-leak-detector]Configurable GC aggressiveness regarding to V8 heap snapshot generation (#15793)[jest-runtime]Reduce redundant ReferenceError messages[jest-core]Include test modules that failed to load when --onlyFailures is activeFixes
- `[jest-snapshot-utils] Fix deprecated goo.gl snapshot guide link not getting replaced with fully canonical URL (#15787)
[jest-circus]Fixit.concurrentnot working withdescribe.skip(#15765)[jest-snapshot]Fix mangled inline snapshot updates when used with Prettier 3 and CRLF line endings[jest-runtime]Importing from@jest/globalsin more than one file no longer breaks relative paths (#15772)Chore
[expect]Update docblock fortoContain()to display info on substring check (#15789)
30.0.5 (from changelog)
Features
[jest-config]AllowtestMatchto take a string value[jest-worker]LetworkerIdleMemoryLimitaccept 0 to always restart worker child processesFixes
[expect]Fixbiginterror (#15702)
30.0.2
What's Changed
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)Full Changelog: https://github.com/jestjs/jest/blob/main/CHANGELOG.md
30.0.1
What's Changed
Features
[jest-resolver]Implement thedefaultAsyncResolver(#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 deprecatejest-replpackage (#15673)[jest-resolver]Replace customisBuiltinModulewith node'sisBuiltin(#15685)New Contributors
Full Changelog: https://github.com/jestjs/jest/blob/main/CHANGELOG.md
30.0.0
Today we are happy to announce the release of Jest 30. This release features a substantial number of changes, fixes, and improvements. While it is one of the largest major releases of Jest ever, we admit that three years for a major release is too long. In the future, we are aiming to make more frequent major releases to keep Jest great for the next decade.
If you want to skip all the news and just get going, run
npm install jest@^30.0.0and follow the migration guide: Upgrading from Jest 29 to 30.Features
[*]RenamedglobalsCleanupModetoglobalsCleanupand--waitNextEventLoopTurnForUnhandledRejectionEventsto--waitForUnhandledRejections[expect]AddArrayOfasymmetric matcher for validating array elements. (#15567)[babel-jest]Add optionexcludeJestPresetto allow opting out ofbabel-preset-jest(#15164)[expect]Revert #15038 to fixexpect(fn).toHaveBeenCalledWith(expect.objectContaining(...))when there are multiple calls (#15508)[jest-circus, jest-cli, jest-config]AddwaitNextEventLoopTurnForUnhandledRejectionEventsflag to minimise performance impact of correct detection of unhandled promise rejections introduced in #14315 (#14681)[jest-circus]Add awaitBeforeRetryoption tojest.retryTimes(#14738)[jest-circus]Add aretryImmediatelyoption tojest.retryTimes(#14696)[jest-circus, jest-jasmine2]AllowsetupFilesAfterEnvto export an async function (#10962)[jest-circus, jest-test-result]AddstartedAttimestamp inTestCaseResultObjectwithinonTestCaseResult(#15145)[jest-cli]ExportbuildArgv(#15310)[jest-config][BREAKING] Addmtsandctsto defaultmoduleFileExtensionsconfig (#14369)[jest-config][BREAKING] UpdatetestMatchandtestRegexdefault option for supportingmjs,cjs,mts, andcts(#14584)[jest-config]Loads config file from provided path inpackage.json(#14044)[jest-config]Allow loadingjest.config.ctsfiles (#14070)[jest-config]ShowrootDirin error message when apresetfails to load (#15194)[jest-config]Support loading TS config files usingesbuild-registervia 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]AddperfStatsto surface test setup overhead (#14622)[@jest/core][BREAKING] Changed--filterto accept an object with shape{ filtered: Array<string> }to match documentation (#13319)[@jest/core]Support--outputFileoption for--listTests(#14980)[@jest/core]Stringify Errors properly with--jsonflag (#15329)[@jest/core, @jest/test-sequencer][BREAKING] ExposesglobalConfig&contextstoTestSequencer(#14535, & #14543)[jest-each]Introduce%$option to add number of the test to its title (#14710)[@jest/environment][BREAKING] Remove deprecatedjest.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 thejsdomenvironment, allowing usage of custom versions of JSDOM (#14717)[jest-environment-node]Update jest environment with dispose symbolsSymbol(#14888 & #14909)[expect, @jest/expect][BREAKING] Add type inference for function parameters inCalledWithassertions (#15129)[@jest/expect-utils]Properly compare all types ofTypedArrays (#15178)[@jest/fake-timers][BREAKING] Upgrade@sinonjs/fake-timersto v13 (#14544 & #15470)[@jest/fake-timers]Exposing new modern timers functionadvanceTimersToFrame()which advances all timers by the needed milliseconds to execute callbacks currently scheduled withrequestAnimationFrame(#14598)[jest-matcher-utils]AddSERIALIZABLE_PROPERTIESto allow custom serialization of objects (#14893)[jest-mock]Add support for the Explicit Resource Management proposal to use theusingkeyword withjest.spyOn(object, methodName)(#14895)[jest-reporters]Add support for DEC mode 2026 (#15008)[jest-resolver]Supportfile://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 functionjest.advanceTimersToFrame()from@jest/fake-timers(#14598)[jest-runtime]Supportimport.meta.filenameandimport.meta.dirname(available from Node 20.11) (#14854)[jest-runtime]Supportimport.meta.resolve(#14930)[jest-runtime][BREAKING] Make it mandatory to passglobalConfigto theRuntimeconstructor (#15044)[jest-runtime]Addunstable_unmockModule(#15080)[jest-runtime]AddonGenerateMocktransformer callback for auto generated callbacks (#15433 & #15482)[jest-runtime][BREAKING] Usevm.compileFunctionovervm.Script(#15461)[@jest/schemas]Upgrade@sinclair/typeboxto v0.34 (#15450)[@jest/types]test.each(): Accept a readonly (as const) table properly (#14565)[@jest/types]Improve argument type inference passed totestanddescribecallback functions fromeachtables (#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 fromjest-snapshotinto its own package (#15095)[pretty-format][BREAKING] Do not render empty string children ('') in React plugin (#14470)Fixes
[expect]ShowAggregateErrorto display (#15346)[*]Replaceexitwithexit-x(#15399)[babel-plugin-jest-hoist]Usedenylistinstead of the deprecatedblacklistfor Babel 8 support (#14109)[babel-plugin-jest-hoist]Do not rely on buggy Babel behaviour (#15415)[expect]Check error instance type fortoThrow/toThrowError(#14576)[expect]Improve diff for failingexpect.objectContaining(#15038)[expect]UseArray.isArrayto check if an array is anArray(#15101)[expect]Fix Errorcauseassertion errors (#15339)[jest-changed-files]Print underlying errors when VCS commands fail (#15052)[jest-changed-files]Abortsl rootcall if output resembles a steam locomotive (#15053)[jest-circus][BREAKING] Prevent false test failures caused by promise rejections handled asynchronously (#14315)[jest-circus]Replace recursivemakeTestResultsimplementation with iterative one (#14760)[jest-circus]Omitexpect.hasAssertions()errors if a test already has errors (#14866)[jest-circus, jest-expect, jest-snapshot]Passtest.failingtests 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 respectrunInBandoption (#14578)[jest-config]SupporttestTimeoutin project config (#14697)[jest-config]SupportcoverageReportersin project config (#14697)[jest-config]Allowreportersin project config (#14768)[jest-config]Allow Node16/NodeNext/BundlermoduleResolutionin project's tsconfig (#14739)[@jest/create-cache-key-function]Correct the return type ofcreateCacheKey(#15159)[jest-each]Allow$keypathtemplates withnullorundefinedvalues (#14831)[@jest/expect-utils]Fix comparison ofDataView(#14408)[@jest/expect-utils][BREAKING] exclude non-enumerable in object matching (#14670)[@jest/expect-utils]Fix comparison ofURL(#14672)[@jest/expect-utils]CheckSymbolproperties 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 multiplehasteImplModulePaths (#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_importCoreModelso required core module is consistent if modified while loading (#15077)[jest-schemas, jest-types][BREAKING] Fix type oftestFailureExitCodeconfig option(#15232)[jest-util]Make sureisInteractiveworks in a browser (#14552)[pretty-format][BREAKING] PrintArrayBufferandDataViewcorrectly (#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
testPathPatternconfiguration option totestPathPatterns, which now takes a list of patterns instead of the regex.- [BREAKING]
--testPathPatternis now--testPathPatterns- [BREAKING] Specifying
testPathPatternswhen programmatically callingwatchmust be specified asnew TestPathPatterns(patterns), whereTestPathPatternscan be imported from@jest/pattern[jest-reporters, jest-runner]Unhandled errors without stack get correctly logged to console (#14619)[jest-util]Always loadmjsfiles withimport(#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 whereObjectContainingmatched non-object values. ([#15463])(#15463).
- Adds a
conditional/checkto ensure the argument passed toexpectis an object.- Add unit tests for new
ObjectContainingbehavior.- Remove
invalid/wrongtest case assertions forObjectContaining.[jest-worker]Addresses incorrect state on exit (#15610)Performance
[*][BREAKING] Bundle all of Jest's modules intoindex.js(#12348, #14550 & #14661)[jest-haste-map]Only spawn one process to check forwatchmaninstallation (#14826)[jest-runner]Better cleanupsource-map-supportafter test to resolve (minor) memory leak (#15233)[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(#15325CVE-2024-37890)[*]Increase version ofmicromatchto^4.0.7(#15082)[*][BREAKING] Drop support for Node.js versions 14, 16, 19, 21 and 23 (#14460, #15118, #15623, #15640)[*][BREAKING] Drop support fortypescript@4.3, minimum version is now5.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 toglob@10(#14509)[*]UseTypeErroroverErrorwhere appropriate (#14799)[docs]Fix typos inCHANGELOG.mdandpackages/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/coreto^7.11(#14109)[babel-jest, @jest/transform]Updatebabel-plugin-istanbulto v6 (#15156)[babel-plugin-jest-hoist]Move unnecessarydependenciestodevDependencies(#15010)[expect][BREAKING] Remove.toBeCalled(),.toBeCalledTimes(),.toBeCalledWith(),.lastCalledWith(),.nthCalledWith(),.toReturn(),.toReturnTimes(),.toReturnWith(),.lastReturnedWith(),.nthReturnedWith()and.toThrowError()matcher aliases (#14632)[jest-cli, jest-config, @jest/types][BREAKING] Remove deprecated--initargument (#14490)[jest-config, @jest/core, jest-util]Upgradeci-info(#14655)[jest-mock][BREAKING] RemoveMockFunctionMetadataType,MockFunctionMetadataandSpyInstancetypes (#14621)[@jest/reporters]Upgradeistanbul-lib-source-maps(#14924)[jest-schemas]Upgrade@sinclair/typebox(#14775)[jest-transform]Upgradewrite-file-atomic(#14274)[jest-util]Upgradepicomatchto v4 (#14653 & #14885)[docs] Append to NODE_OPTIONS, not overwrite ([#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)See the CHANGELOG.
Does any of this look wrong? Please let us know.
Commits
See the full diff on Github. The new version differs by more commits than we can show here.
↗️ pirates (indirect, 4.0.6 → 4.0.7) · Repo
Commits
See the full diff on Github. The new version differs by 12 commits:
chore: downgrade stack-utilsfix: remove build process and ship source directlyfix: Update some wording and fix grammar in messages (#121)chore: update dev deps and remove renovatechore(deps): lock file maintenance (#89)chore(deps): update babel monorepo (#117)chore(deps): update dependency eslint-plugin-import to v2.28.0chore(deps): update babel monorepo to v7.22.9chore(deps): bump word-wrap from 1.2.3 to 1.2.4 (#115)chore(deps): update babel monorepochore(deps): update dependency decache to v4.6.2chore(deps): bump semver from 5.7.1 to 5.7.2 (#113)
↗️ pretty-format (indirect, 29.7.0 → 30.2.0) · Repo · Changelog
Release Notes
30.2.0
Chore & Maintenance
[*]Update example repo for testing React Native projects (#15832)[*]Updatejest-watch-typeaheadto v3 (#15830)Features
[jest-environment-jsdom-abstract]Add support for JSDOM v27 (#15834)Fixes
30.0.5 (from changelog)
Features
[jest-config]AllowtestMatchto take a string value[jest-worker]LetworkerIdleMemoryLimitaccept 0 to always restart worker child processesFixes
[expect]Fixbiginterror (#15702)
30.0.2
What's Changed
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)Full Changelog: https://github.com/jestjs/jest/blob/main/CHANGELOG.md
30.0.1
What's Changed
Features
[jest-resolver]Implement thedefaultAsyncResolver(#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 deprecatejest-replpackage (#15673)[jest-resolver]Replace customisBuiltinModulewith node'sisBuiltin(#15685)New Contributors
Full Changelog: https://github.com/jestjs/jest/blob/main/CHANGELOG.md
30.0.0
Today we are happy to announce the release of Jest 30. This release features a substantial number of changes, fixes, and improvements. While it is one of the largest major releases of Jest ever, we admit that three years for a major release is too long. In the future, we are aiming to make more frequent major releases to keep Jest great for the next decade.
If you want to skip all the news and just get going, run
npm install jest@^30.0.0and follow the migration guide: Upgrading from Jest 29 to 30.Features
[*]RenamedglobalsCleanupModetoglobalsCleanupand--waitNextEventLoopTurnForUnhandledRejectionEventsto--waitForUnhandledRejections[expect]AddArrayOfasymmetric matcher for validating array elements. (#15567)[babel-jest]Add optionexcludeJestPresetto allow opting out ofbabel-preset-jest(#15164)[expect]Revert #15038 to fixexpect(fn).toHaveBeenCalledWith(expect.objectContaining(...))when there are multiple calls (#15508)[jest-circus, jest-cli, jest-config]AddwaitNextEventLoopTurnForUnhandledRejectionEventsflag to minimise performance impact of correct detection of unhandled promise rejections introduced in #14315 (#14681)[jest-circus]Add awaitBeforeRetryoption tojest.retryTimes(#14738)[jest-circus]Add aretryImmediatelyoption tojest.retryTimes(#14696)[jest-circus, jest-jasmine2]AllowsetupFilesAfterEnvto export an async function (#10962)[jest-circus, jest-test-result]AddstartedAttimestamp inTestCaseResultObjectwithinonTestCaseResult(#15145)[jest-cli]ExportbuildArgv(#15310)[jest-config][BREAKING] Addmtsandctsto defaultmoduleFileExtensionsconfig (#14369)[jest-config][BREAKING] UpdatetestMatchandtestRegexdefault option for supportingmjs,cjs,mts, andcts(#14584)[jest-config]Loads config file from provided path inpackage.json(#14044)[jest-config]Allow loadingjest.config.ctsfiles (#14070)[jest-config]ShowrootDirin error message when apresetfails to load (#15194)[jest-config]Support loading TS config files usingesbuild-registervia 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]AddperfStatsto surface test setup overhead (#14622)[@jest/core][BREAKING] Changed--filterto accept an object with shape{ filtered: Array<string> }to match documentation (#13319)[@jest/core]Support--outputFileoption for--listTests(#14980)[@jest/core]Stringify Errors properly with--jsonflag (#15329)[@jest/core, @jest/test-sequencer][BREAKING] ExposesglobalConfig&contextstoTestSequencer(#14535, & #14543)[jest-each]Introduce%$option to add number of the test to its title (#14710)[@jest/environment][BREAKING] Remove deprecatedjest.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 thejsdomenvironment, allowing usage of custom versions of JSDOM (#14717)[jest-environment-node]Update jest environment with dispose symbolsSymbol(#14888 & #14909)[expect, @jest/expect][BREAKING] Add type inference for function parameters inCalledWithassertions (#15129)[@jest/expect-utils]Properly compare all types ofTypedArrays (#15178)[@jest/fake-timers][BREAKING] Upgrade@sinonjs/fake-timersto v13 (#14544 & #15470)[@jest/fake-timers]Exposing new modern timers functionadvanceTimersToFrame()which advances all timers by the needed milliseconds to execute callbacks currently scheduled withrequestAnimationFrame(#14598)[jest-matcher-utils]AddSERIALIZABLE_PROPERTIESto allow custom serialization of objects (#14893)[jest-mock]Add support for the Explicit Resource Management proposal to use theusingkeyword withjest.spyOn(object, methodName)(#14895)[jest-reporters]Add support for DEC mode 2026 (#15008)[jest-resolver]Supportfile://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 functionjest.advanceTimersToFrame()from@jest/fake-timers(#14598)[jest-runtime]Supportimport.meta.filenameandimport.meta.dirname(available from Node 20.11) (#14854)[jest-runtime]Supportimport.meta.resolve(#14930)[jest-runtime][BREAKING] Make it mandatory to passglobalConfigto theRuntimeconstructor (#15044)[jest-runtime]Addunstable_unmockModule(#15080)[jest-runtime]AddonGenerateMocktransformer callback for auto generated callbacks (#15433 & #15482)[jest-runtime][BREAKING] Usevm.compileFunctionovervm.Script(#15461)[@jest/schemas]Upgrade@sinclair/typeboxto v0.34 (#15450)[@jest/types]test.each(): Accept a readonly (as const) table properly (#14565)[@jest/types]Improve argument type inference passed totestanddescribecallback functions fromeachtables (#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 fromjest-snapshotinto its own package (#15095)[pretty-format][BREAKING] Do not render empty string children ('') in React plugin (#14470)Fixes
[expect]ShowAggregateErrorto display (#15346)[*]Replaceexitwithexit-x(#15399)[babel-plugin-jest-hoist]Usedenylistinstead of the deprecatedblacklistfor Babel 8 support (#14109)[babel-plugin-jest-hoist]Do not rely on buggy Babel behaviour (#15415)[expect]Check error instance type fortoThrow/toThrowError(#14576)[expect]Improve diff for failingexpect.objectContaining(#15038)[expect]UseArray.isArrayto check if an array is anArray(#15101)[expect]Fix Errorcauseassertion errors (#15339)[jest-changed-files]Print underlying errors when VCS commands fail (#15052)[jest-changed-files]Abortsl rootcall if output resembles a steam locomotive (#15053)[jest-circus][BREAKING] Prevent false test failures caused by promise rejections handled asynchronously (#14315)[jest-circus]Replace recursivemakeTestResultsimplementation with iterative one (#14760)[jest-circus]Omitexpect.hasAssertions()errors if a test already has errors (#14866)[jest-circus, jest-expect, jest-snapshot]Passtest.failingtests 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 respectrunInBandoption (#14578)[jest-config]SupporttestTimeoutin project config (#14697)[jest-config]SupportcoverageReportersin project config (#14697)[jest-config]Allowreportersin project config (#14768)[jest-config]Allow Node16/NodeNext/BundlermoduleResolutionin project's tsconfig (#14739)[@jest/create-cache-key-function]Correct the return type ofcreateCacheKey(#15159)[jest-each]Allow$keypathtemplates withnullorundefinedvalues (#14831)[@jest/expect-utils]Fix comparison ofDataView(#14408)[@jest/expect-utils][BREAKING] exclude non-enumerable in object matching (#14670)[@jest/expect-utils]Fix comparison ofURL(#14672)[@jest/expect-utils]CheckSymbolproperties 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 multiplehasteImplModulePaths (#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_importCoreModelso required core module is consistent if modified while loading (#15077)[jest-schemas, jest-types][BREAKING] Fix type oftestFailureExitCodeconfig option(#15232)[jest-util]Make sureisInteractiveworks in a browser (#14552)[pretty-format][BREAKING] PrintArrayBufferandDataViewcorrectly (#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
testPathPatternconfiguration option totestPathPatterns, which now takes a list of patterns instead of the regex.- [BREAKING]
--testPathPatternis now--testPathPatterns- [BREAKING] Specifying
testPathPatternswhen programmatically callingwatchmust be specified asnew TestPathPatterns(patterns), whereTestPathPatternscan be imported from@jest/pattern[jest-reporters, jest-runner]Unhandled errors without stack get correctly logged to console (#14619)[jest-util]Always loadmjsfiles withimport(#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 whereObjectContainingmatched non-object values. ([#15463])(#15463).
- Adds a
conditional/checkto ensure the argument passed toexpectis an object.- Add unit tests for new
ObjectContainingbehavior.- Remove
invalid/wrongtest case assertions forObjectContaining.[jest-worker]Addresses incorrect state on exit (#15610)Performance
[*][BREAKING] Bundle all of Jest's modules intoindex.js(#12348, #14550 & #14661)[jest-haste-map]Only spawn one process to check forwatchmaninstallation (#14826)[jest-runner]Better cleanupsource-map-supportafter test to resolve (minor) memory leak (#15233)[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(#15325CVE-2024-37890)[*]Increase version ofmicromatchto^4.0.7(#15082)[*][BREAKING] Drop support for Node.js versions 14, 16, 19, 21 and 23 (#14460, #15118, #15623, #15640)[*][BREAKING] Drop support fortypescript@4.3, minimum version is now5.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 toglob@10(#14509)[*]UseTypeErroroverErrorwhere appropriate (#14799)[docs]Fix typos inCHANGELOG.mdandpackages/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/coreto^7.11(#14109)[babel-jest, @jest/transform]Updatebabel-plugin-istanbulto v6 (#15156)[babel-plugin-jest-hoist]Move unnecessarydependenciestodevDependencies(#15010)[expect][BREAKING] Remove.toBeCalled(),.toBeCalledTimes(),.toBeCalledWith(),.lastCalledWith(),.nthCalledWith(),.toReturn(),.toReturnTimes(),.toReturnWith(),.lastReturnedWith(),.nthReturnedWith()and.toThrowError()matcher aliases (#14632)[jest-cli, jest-config, @jest/types][BREAKING] Remove deprecated--initargument (#14490)[jest-config, @jest/core, jest-util]Upgradeci-info(#14655)[jest-mock][BREAKING] RemoveMockFunctionMetadataType,MockFunctionMetadataandSpyInstancetypes (#14621)[@jest/reporters]Upgradeistanbul-lib-source-maps(#14924)[jest-schemas]Upgrade@sinclair/typebox(#14775)[jest-transform]Upgradewrite-file-atomic(#14274)[jest-util]Upgradepicomatchto v4 (#14653 & #14885)[docs] Append to NODE_OPTIONS, not overwrite ([#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)See the CHANGELOG.
Does any of this look wrong? Please let us know.
Commits
See the full diff on Github. The new version differs by more commits than we can show here.
↗️ pure-rand (indirect, 6.1.0 → 7.0.1) · Repo · Changelog
Release Notes
7.0.1 (from changelog)
Fixes
7.0.0 (from changelog)
Breaking Changes
- 2c94832 🏷️ Move to "import type" when feasible (#736)
- 3741a63 🏷️ Mark
getStateas compulsory onRandomGenerator(#733)Features
- 228c73d ⚡️ Faster uniform distributions on bigint (#757)
- 86869a1 ✨ Expose generators and distributions (#735)
Fixes
Does any of this look wrong? Please let us know.
Commits
See the full diff on Github. The new version differs by 60 commits:
7.0.1Prepare CHANGELOG for 7.0.1🐛 Properly define exports in package.json (#758)⬆️ Update dependency replace-in-file to v8 (#714)⬆️ Update dependency tinybench to v3 (#744)⬆️ Update codecov/codecov-action action to v5 (#748)⬆️ Update dependency prettier to v3.4.2 (#752)⬆️ Update dependency @types/node to ^22.13.1 (#753)⬆️ Update dependency fast-check to ^3.23.2 (#754)⬆️ Update actions/setup-node action to v4.2.0 (#756)⬆️ Update Yarn to v4.6.0 (#755)7.0.0Prepare CHANGELOG for 7.0.0⚡️ Faster uniform distributions on bigint (#757)⬆️ Update dependency @types/node to v22 (#746)⬆️ Update dependency fast-check to ^3.23.1 (#747)⬆️ Update Yarn to v4.5.3 (#749)⬆️ Update dependency prettier to v3.4.1 (#750)⬆️ Update dependency @types/node to ^20.17.1 (#739)⬆️ Update actions/checkout action to v4.2.2 (#740)⬆️ Update Yarn to v4.5.1 (#741)⬆️ Update dependency @types/jest to ^29.5.14 (#742)⬆️ Update actions/setup-node action to v4.1.0 (#743)🚚 Do not export mersenne as default (#738)🚚 Split ArrayInt into two files (#737)🏷️ Move to "import type" when feasible (#736)✨ Expose generators and distributions (#735)🚚 Moving files around (#734)⬆️ Update dependency @types/jest to ^29.5.13 (#731)⬆️ Update dependency ts-jest to ^29.2.5 (#727)🏷️ Mark `getState` as compulsory on `RandomGenerator` (#733)⬆️ Update dependency tinybench to ^2.9.0 (#728)⬆️ Update Yarn to v4.5.0 (#729)⬆️ Update dependency fast-check to ^3.22.0 (#730)⬆️ Update actions/setup-node action to v4.0.4 (#732)⬆️ Update dependency @types/node to ^20.16.6 (#726)⬆️ Update dependency @types/node to ^20.14.11 (#724)⬆️ Update actions/setup-node action to v4.0.3 (#720)⬆️ Update dependency ts-jest to ^29.2.3 (#721)⬆️ Update dependency prettier to v3.3.3 (#723)Add 'tested with fast-check' badge⬆️ Update dependency fast-check to ^3.20.0 (#722)⬆️ Update dependency ts-jest to ^29.2.0 (#719)⬆️ Update dependency @types/node to ^20.14.10 (#718)⬆️ Update dependency typescript to ^5.5.3 (#717)⬆️ Update dependency tinybench to ^2.8.0 (#706)⬆️ Update dependency fast-check to ^3.19.0 (#705)⬆️ Update actions/checkout action to v4.1.7 (#707)⬆️ Update dependency @types/node to ^20.14.9 (#708)⬆️ Update Yarn to v4.3.1 (#709)⬆️ Update dependency ts-jest to ^29.1.5 (#710)⬆️ Update dependency replace-in-file to ^7.2.0 (#711)📝 Document generation of float/double (#715)⬆️ Update dependency prettier to v3.3.2 (#712)⬆️ Update dependency typescript to ^5.5.2 (#713)⬆️ Update dependency @types/node to ^20.12.7 (#703)⬆️ Update dependency typescript to ^5.4.5 (#700)⬆️ Update dependency fast-check to ^3.17.1 (#702)⬆️ Update dependency tinybench to ^2.7.0 (#704)⬆️ Update dependency fast-check to ^3.17.0 (#701)
↗️ semver (indirect, 7.6.3 → 7.7.3) · Repo · Changelog
Release Notes
7.7.3
7.7.3 (2025-10-06)
Bug Fixes
e37e0ca#813 faster paths for compare (#813) (@H4ad)2471d75#811 x-range build metadata support (i529015)Chores
8f05c87#807 bump @npmcli/template-oss from 4.25.0 to 4.25.1 (#807) (@dependabot[bot], @owlstronaut)
7.7.2
7.7.2 (2025-05-12)
Bug Fixes
fcafb61#780 add missing'use strict'directives (#780) (@Fdawgs)c99f336#781 prerelease identifier starting with digits (#781) (@mbtools)Chores
c760403#784 template-oss-apply for workflow permissions (#784) (@wraithgar)2677f2a#778 bump @npmcli/template-oss from 4.23.6 to 4.24.3 (#778) (@dependabot[bot], @npm-cli-bot)
7.7.1
7.7.1 (2025-02-03)
Bug Fixes
af761c0#764 inc: fully capture prerelease identifier (#764) (@wraithgar)
7.7.0
7.7.0 (2025-01-29)
Features
Bug Fixes
d588e37#755 diff: fix prerelease to stable version diff logic (#755) (@eminberkayd, berkay.daglar)8a34bde#754 add identifier validation toinc()(#754) (@mbtools)Documentation
67e5478#756 readme: added missing period for consistency (#756) (@shaymolcho)868d4bb#749 clarify comment about obsolete prefixes (#749) (@mbtools, @ljharb)Chores
145c554#741 bump @npmcli/eslint-config from 4.0.5 to 5.0.0 (@dependabot[bot])753e02b#747 bump @npmcli/template-oss from 4.23.3 to 4.23.4 (#747) (@dependabot[bot], @npm-cli-bot)0b812d5#744 postinstall for dependabot template-oss PR (@hashtagchris)
Does any of this look wrong? Please let us know.
Commits
See the full diff on Github. The new version differs by 26 commits:
chore: release 7.7.3 (#812)fix: faster paths for compare (#813)fix: x-range build metadata supportchore: bump @npmcli/template-oss from 4.25.0 to 4.25.1 (#807)chore: bump @npmcli/template-oss from 4.24.4 to 4.25.0 (#797)chore: bump @npmcli/template-oss from 4.24.3 to 4.24.4 (#790)chore: release 7.7.2 (#783)fix: add missing `'use strict'` directives (#780)chore: template-oss-apply for workflow permissions (#784)fix: prerelease identifier starting with digits (#781)chore: bump @npmcli/template-oss from 4.23.6 to 4.24.3 (#778)chore: bump @npmcli/template-oss from 4.23.4 to 4.23.6 (#760)chore: release 7.7.1 (#765)fix(inc): fully capture prerelease identifier (#764)chore: release 7.7.0 (#750)fix(diff): fix prerelease to stable version diff logic (#755)chore: bump @npmcli/template-oss from 4.23.3 to 4.23.4 (#747)fix: add identifier validation to `inc()` (#754)feat: add "release" inc type (#753)docs(readme): added missing period for consistency (#756)docs: clarify comment about obsolete prefixes (#749)chore: bump @npmcli/eslint-config from 4.0.5 to 5.0.0chore: postinstall for dependabot template-oss PRchore: bump @npmcli/template-oss from 4.23.1 to 4.23.3chore: bump @npmcli/template-oss from 4.22.0 to 4.23.1chore: bump @npmcli/template-oss from 4.22.0 to 4.23.1
↗️ signal-exit (indirect, 3.0.7 → 4.1.0) · Repo · Changelog
Commits
See the full diff on Github. The new version differs by 19 commits:
4.1.0add prettierignore fileremove incorrect line from changelogallow handler to capture signal exitsci: drop node 144.0.3increment by old signal-exit's count, not just 14.0.2chore: remove error logadd no longer setting process.exitCode to changelog4.0.1don't get confused by old versions of signal-exitupdate license yearc8 ignore a platform-specific line4.0.0v4 rewrite: hybrid module, TS, and named exportsci: tests and fundingchore: correct license copyright statementci: makework
↗️ string-width (indirect, 4.2.3 → 5.1.2) · Repo
Release Notes
5.1.2
5.1.1
- Fix incorrect default for
ambiguousIsNarrowoption 483baa1
5.1.0
5.0.1
5.0.0
Breaking
Does any of this look wrong? Please let us know.
Commits
See the full diff on Github. The new version differs by 51 commits:
5.1.2Use `for..of` loop (#40)Add test for #2 (#39)5.1.1Fix incorrect default for `ambiguousIsNarrow` option5.1.0Add `ambiguousIsNarrow` option (#34)5.0.1Upgrade `strip-ansi` (#31)5.0.0Require Node.js 12 and move to ESM4.2.2Improve performance (#28)4.2.1Improve performance by performing an early exit (#27)Move to GitHub Actions (#25)4.2.0Update to strip-ansi v6.x (#24)Tidelift tasksCreate funding.ymlAdd Node.js 12 to testing (#23)4.1.0Refactor TypeScript definition to CommonJS compatible export (#22)4.0.0Require Node.js 8Add TypeScript definition (#21)3.1.0Add support for terminal link (#20)3.0.0Require Node.js 6Support emoji (#17)2.1.1Meta tweaksSupport combining characters (#12)2.1.0Meta tweaksUpdate strip-ansi from ^3.0.0 to ^4.0.0 (#10)Add failing test for #6Meta tweaks2.0.0ES2015ify and require Node.js 41.0.2meta tweaksignore control charactersupdate tests for latest AVA versionreadme tweaks1.0.1return 0 on empty strings and non-stringsadd `string-width-cli` to the Related section in the readme1.0.0init
↗️ strip-ansi (indirect, 6.0.1 → 7.1.2) · Repo
Release Notes
7.1.2
- Fix vulnerability in 7.1.1, see: chalk/chalk#656
7.1.0
7.0.1
- Upgrade dependencies ed41f38
7.0.0
Breaking
Does any of this look wrong? Please let us know.
Commits
See the full diff on Github. The new version differs by 71 commits:
7.1.2Mention Node.js built-in APIMeta tweaks7.1.0Improve performance (#49)Fix CI7.0.1Upgrade dependencies7.0.0Require Node.js 12 and move to ESMAdd @Qix- to funding.ymlMove to GitHub ActionsAdd Node.js 14 to testing matrix (#35)6.0.0Require Node.js 8Tidelift tasksTidelift tasks5.2.0Meta tweaksAdd TypeScript definition (#28)Fix readme (#27)5.1.0Add support for terminal link (#26)Add security section5.0.0Require Node.js 6 and upgrade dependenciesAdd Tidelift mention in the readmeAdd related streaming version of this module to the readme (#15)4.0.0Bump ansi-regexRequire Node.js 43.0.1Updates maintainer email.update tests for latest AVA versionadd XOadded Qix as maintainerupdate references to new org3.0.0move CLI into a separate moduleUse `meow` in CLIminor package.json tweaks2.0.2Bumps deps.Updates maintainer info.Update .travis.yml2.0.1Merge pull request #6 from strongloop-forks/not-a-ttycli: allow file name arg without a TTYtest: cli accepts file name as argumentreadme tweaks2.0.0tweaks1.0.00.3.0bump ansi-regex0.2.2minor tweaksuse ansi-regeximprove the CLI0.2.1Close GH-3: Repaired a bug whereby color was not correctly stripped from the ls command.0.2.0readme tweaksMerge pull request #2 from benwhite-ext-nokia/masterStrip arbitrary-length escape sequencesUpdate .travis.yml0.1.1improve descriptionstrip colors streaming0.1.0init
↗️ wrap-ansi (indirect, 7.0.0 → 8.1.0) · Repo
Release Notes
8.1.0
8.0.1
- Upgrade dependencies 0ff29cc
8.0.0
Breaking
Does any of this look wrong? Please let us know.
Commits
See the full diff on Github. The new version differs by 8 commits:
↗️ write-file-atomic (indirect, 4.0.2 → 5.0.1) · Repo · Changelog
Release Notes
5.0.1
5.0.1 (2023-04-26)
Dependencies
5.0.0
5.0.0 (2022-10-10)
⚠️ BREAKING CHANGES
write-file-atomicis now compatible with the following semver range for node:^14.17.0 || ^16.13.0 || >=18.0.0Features
5506c07#122 postinstall for dependabot template-oss PR (@lukekarrys)
Does any of this look wrong? Please let us know.
Commits
See the full diff on Github. The new version differs by 31 commits:
chore: release 5.0.1chore: enable auto-publish (#161)chore: bump @npmcli/template-oss from 4.13.0 to 4.14.1 (#160)chore: bump @npmcli/template-oss from 4.12.1 to 4.13.0 (#158)deps: bump signal-exit from 3.0.7 to 4.0.1 (#157)chore: bump @npmcli/template-oss from 4.12.0 to 4.12.1 (#154)chore(deps): remove mkdirp and rimraf (#143)chore: postinstall for dependabot template-oss PRchore: bump @npmcli/template-oss from 4.11.4 to 4.12.0chore: postinstall for dependabot template-oss PRchore: bump @npmcli/template-oss from 4.11.3 to 4.11.4chore: postinstall for dependabot template-oss PRchore: bump @npmcli/template-oss from 4.11.0 to 4.11.3chore: postinstall for dependabot template-oss PRchore: bump @npmcli/template-oss from 4.10.0 to 4.11.0chore: postinstall for dependabot template-oss PRchore: bump @npmcli/template-oss from 4.8.0 to 4.10.0chore: postinstall for dependabot template-oss PRchore: bump @npmcli/template-oss from 4.6.1 to 4.8.0chore: postinstall for dependabot template-oss PRchore: bump @npmcli/template-oss from 4.5.1 to 4.6.1chore: bump @npmcli/eslint-config from 3.1.0 to 4.0.0chore: release 5.0.0 (#123)chore: postinstall for dependabot template-oss PRchore: bump @npmcli/template-oss from 4.4.4 to 4.5.1chore: postinstall for dependabot template-oss PRchore: bump @npmcli/template-oss from 4.3.2 to 4.4.4feat!: postinstall for dependabot template-oss PRchore: bump @npmcli/template-oss from 3.6.0 to 4.3.2chore: postinstall for dependabot template-oss PRchore: bump @npmcli/template-oss from 3.5.0 to 3.6.0