@jest/core
30.5.2 · 18 Sep 2026MIT60.2M / weekRepositoryHomepagenpmAtom feed
25.5.4 is the newest release of 25.x.
In short
19 breaking33 new28 fixed9 internal
- breaking
jest-config: Set default display name color based on runner
- breaking
jest-config: Support
.mjsconfig files - breaking
jest-diff: Export as ECMAScript module
- breaking
jest-runtime: Do not export
ScriptTransformer- it can be imported from@jest/transforminstead - breaking
jest-snapshot: Improve report when the matcher has properties
- breaking
jest-transform: Return transformed code as a string, do not wrap in
vm.Script - breaking
jest-worker: Return a promise from
end(), resolving with the information whether workers exited gracefully - breaking
expect: Consider primitives different from wrappers instantiated with
new
Release note
Features
babel-plugin-jest-hoist: Show codeframe on static hoisting issues
babel-plugin-jest-hoist: Add
BigInttoALLOWED_IDENTIFIERSbabel-preset-jest: Add
@babel/plugin-syntax-bigintexpect: Add
BigIntsupport totoBeGreaterThan,toBeGreaterThanOrEqual,toBeLessThanandtoBeLessThanOrEqualexpect, jest-matcher-utils: Display change counts in annotation lines
expect, jest-snapshot: Support custom inline snapshot matchers
jest-config: Throw the full error message and stack when a Jest preset is missing a dependency
- breaking
jest-config: Set default display name color based on runner
jest-config: Merge preset globals with project globals
jest-config: Support
.cjsconfig files- breaking
jest-config: Support
.mjsconfig files jest-core: Support reporters as default exports
jest-core: Support
--findRelatedTestspaths case insensitivity on Windowsjest-diff: Add options for colors and symbols
- breaking
jest-diff: Export as ECMAScript module
jest-diff: Add
includeChangeCountsand renameIndicatoroptionsjest-diff: Add
changeColorandpatchColoroptionsjest-diff: Add
trailingSpaceFormatteroption and replace cyan withcommonColorjest-diff: Add
firstOrLastEmptyLineReplacementoption and export 3diffLinesfunctionsjest-environment: Add optional
getVmContextnext torunScript(#9252 & #9428)jest-environment-jsdom: Add
fakeTimersLolexjest-environment-node: Add
fakeTimersLolexjest-environment-node: Add
queueMicrotaskjest-environment-node: Implement
getVmContext(#9252 & #9428)@jest/fake-timers: Add Lolex as implementation of fake timers
jest-get-type: Add
BigIntsupport.jest-matcher-utils: Add
BigIntsupport toensureNumbersensureActualIsNumber,ensureExpectedIsNumberjest-matcher-utils: Ignore highlighting matched asymmetricMatcher in diffs
jest-reporters: Export utils for path formatting
jest-reporters: Provides global coverage thresholds as watermarks for istanbul
jest-runner: Warn if a worker had to be force exited
- breaking
jest-runtime: Do not export
ScriptTransformer- it can be imported from@jest/transforminstead jest-runtime: Use
JestEnvironment.getVmContextandvm.compileFunctionif available to avoid the module wrapper (#9252 & #9428)jest-snapshot: Display change counts in annotation lines
- breaking
jest-snapshot: Improve report when the matcher has properties
jest-snapshot: Improve colors when snapshots are updatable
jest-snapshot: Ignore indentation for most serialized objects
jest-transform: Create
createTranspilingRequirefunction for easy transpiling modules- breaking
jest-transform: Return transformed code as a string, do not wrap in
vm.Script @jest/test-result: Create method to create empty
TestResult- breaking
jest-worker: Return a promise from
end(), resolving with the information whether workers exited gracefully jest-reporters: Transform file paths into hyperlinks
Fixes
expect: Display
expectedDiffmore carefully intoBeCloseToexpect: Avoid incorrect difference for subset when
toMatchObjectfailsexpect: Consider all RegExp flags for equality
- breaking
expect: Consider primitives different from wrappers instantiated with
new expect: Prevent maintaining RegExp state between multiple tests
expect: Fix subsetEquality false circular reference detection
jest-config: Use half of the available cores when
watchAllmode is enabledjest-config: Fix Jest multi project runner still cannot handle exactly one project
jest-console: Add missing
console.groupcalls toNullConsolejest-core: Don't include unref'd timers in --detectOpenHandles results
jest-core: Limit number of workers when creating haste maps in projects
jest-diff: Do not inverse format if line consists of one change
jest-diff: Rename some new options and change their default values
jest-environment-node: Fix
TextEncoder.encodenot referencing same globalUint8Arrayconstructorjest-fake-timers:
getTimerCountwill not include cancelled immediatesjest-fake-timers: Support
util.promisifyonsetTimeoutjest-jasmine2, jest-circus: Improve error message format for Node's assert.fail
- breaking
jest-leak-detector: Use
weak-napiinstead ofweakpackage jest-mock: Fix for mockReturnValue overriding mockImplementationOnce
jest-reporters: Make node-notifier an optional dependency
jest-reporters: Make all arguments to methods on
BaseReporteroptional: Set MODULE_NOT_FOUND as error code when module is not resolved from paths
jest-resolve-dependencies: Handle dynamic dependencies correctly even when using module maps
jest-snapshot: Remove only the added newlines in multiline snapshots
jest-snapshot: Distinguish empty string from external snapshot not written
- breaking
jest-snapshot: Distinguish empty string from internal snapshot not written
- breaking
jest-snapshot: Remove
reportmethod and throw matcher errors jest-snapshot: Omit irrelevant
receivedproperties when property matchers failjest-transform: Properly cache transformed files across tests
jest-transform: Don't fail the test suite when a generated source map is invalid
- breaking
jest-types: Use less
null | undefinedin config types jest-util: Allow querying process.domain
pretty-format: Correctly detect memoized elements
pretty-format: Fix pretty-format to respect displayName on forwardRef
Chore & Maintenance
- breaking
*: Drop support for Node 6
- breaking
*: Upgrade to Micromatch v4
- breaking
babel-plugin-jest-hoist: Use ESM exports
- breaking
jest: Use ESM exports
- breaking
jest-cli: Use ESM exports
- breaking
jest-cli: Remove re-exports from
@jest/core - breaking
jest-environment-jsdom: Upgrade JSDOM from v11 to v15
- breaking
jest-reporters: Upgrade Istanbul dependencies, which are used for code coverage
- breaking
jest-util: Remove deprecated exports
- breaking
jest-validate: Use ESM exports