@jest/core
30.5.2 · 18 Sep 2026MIT60.2M / weekRepositoryHomepagenpmAtom feed
28.1.3 is the newest release of 28.x.
In short
48 breaking35 new27 fixed14 internal
- breaking
jest-cli, jest-config: Remove
testURLconfig, usetestEnvironmentOptions.urlinstead - breaking
jest-cli: Remove undocumented
--timersoption - breaking
jest-config: Stop shipping
jest-environment-jsdomby default - breaking
jest-config: Stop shipping
jest-jasmine2by default - breaking
jest-config: Rename
moduleLoadertoruntime - breaking
jest-config: Rename
extraGlobalstosandboxInjectedGlobals - breaking
jest-config: Throw an error instead of showing a warning if multiple configs are used
- breaking
jest-config: Do not normalize long deprecated configuration options
preprocessorIgnorePatterns,scriptPreprocessor,setupTestFrameworkScriptFileandtestPathDirs
Release note
Blog post: jestjs.io/blog/2022/04/25/jest-28
Features
babel-jest: Export
createTransformerfunctionexpect: Expose
AsymmetricMatchers,MatcherFunctionandMatcherFunctionWithStateinterfaces (#12363, #12376)jest-circus: Support error logging before retry
jest-circus, jest-jasmine2: Allowed classes and functions as
describeandit/testnames- breaking
jest-cli, jest-config: Remove
testURLconfig, usetestEnvironmentOptions.urlinstead jest-cli, jest-core: Add
--shardparameter for distributed parallel test execution- breaking
jest-cli: Remove undocumented
--timersoption - breaking
jest-config: Stop shipping
jest-environment-jsdomby default - breaking
jest-config: Stop shipping
jest-jasmine2by default jest-config, @jest/types: Add
citoGlobalConfig- breaking
jest-config: Rename
moduleLoadertoruntime - breaking
jest-config: Rename
extraGlobalstosandboxInjectedGlobals - breaking
jest-config: Throw an error instead of showing a warning if multiple configs are used
- breaking
jest-config: Do not normalize long deprecated configuration options
preprocessorIgnorePatterns,scriptPreprocessor,setupTestFrameworkScriptFileandtestPathDirs jest-cli, jest-core: Add
--ignoreProjectsCLI argument to ignore test suites by project namejest-core: Pass project config to
globalSetup/globalTeardownfunction as second argumentjest-core: Stabilize test runners with event emitters
- breaking
jest-core, jest-watcher: Move
TestWatcherclass tojest-watcherpackage jest-core: Allow using Summary Reporter as stand-alone reporter
- breaking
jest-environment-jsdom: Upgrade jsdom to 19.0.0
- breaking
jest-environment-jsdom: Add default
browsercondition toexportConditionsforjsdomenvironment - breaking
jest-environment-jsdom: Pass global config to Jest environment constructor for
jsdomenvironment - breaking
jest-environment-jsdom: Second argument
contextto constructor is mandatory - breaking
jest-environment-node: Add default
nodeandnode-addonconditions toexportConditionsfornodeenvironment - breaking
jest-environment-node: Pass global config to Jest environment constructor for
nodeenvironment - breaking
jest-environment-node: Second argument
contextto constructor is mandatory jest-environment-node: Add all available globals to test globals, not just explicit ones (#12642, #12696)
@jest/expect: New module which extends
expectwithjest-snapshotmatchers (#12404, #12410, #12418)@jest/expect-utils: New module exporting utils for
expect- breaking
@jest/fake-timers: Rename
timersconfiguration option tofakeTimers - breaking
@jest/fake-timers: Allow
jest.useFakeTimers()andprojectConfig.fakeTimersto take an options bag - breaking
jest-haste-map:
HasteMap.createnow returns a promise jest-haste-map: Add support for
dependencyExtractorwritten in ESM- breaking
jest-mock: Rename exported utility types
ClassLike,FunctionLike,ConstructorLikeKeys,MethodLikeKeys,PropertyLikeKeys; remove exports of utility typesArgumentsOf,ArgsType,ConstructorArgumentsOf- TS builtin utility typesConstructorParametersandParametersshould be used instead (#12435, #12489) jest-mock: Improve
isMockFunctionto infer types of passed function- breaking
jest-mock: Improve the usage of
jest.fngeneric type argument jest-mock: Add support for auto-mocking async generator functions
jest-mock: Add
contextsmember to mock functions@jest/reporters: Add GitHub Actions reporter (#11320, #12658)
@jest/reporters: Pass
reporterContextto custom reporter constructors as third argument- breaking
jest-resolve: Add support for
package.jsonexports(#11961, #12373) jest-resolve: Support package self-reference
jest-resolve, jest-runtime: Add support for
data:URI import and mockjest-resolve, jest-runtime: Add support for async resolver
- breaking
jest-resolve: Remove
browser?: booleanfrom resolver options,conditions: ['browser']should be used instead jest-resolve: Expose
JestResolver,AsyncResolver,SyncResolver,PackageFilter,PathFilterandPackageJSONtypes (#12707,jest-runner: Allow
setupFilesmodule to export an async functionjest-runner: Allow passing
testEnvironmentOptionsvia docblocksjest-runner: Expose
CallbackTestRunner,EmittingTestRunnerabstract classes andCallbackTestRunnerInterface,EmittingTestRunnerInterfaceto help typing third party runners (#12646, #12715)jest-runner: Lock version of
source-map-supportto 0.5.13- breaking
jest-runtime:
Runtime.createHasteMapnow returns a promise jest-runtime: Calling
jest.resetModulesfunction will clear FS and transform cache- breaking
jest-runtime: Remove
Contexttype export, it must be imported from@jest/test-result jest-runtime: Add
import.meta.jest@jest/schemas: New module for JSON schemas for Jest's config
@jest/source-map: Migrate from
source-mapto@jridgewell/trace-mapping- breaking
jest-transform: Make it required for
process()andprocessAsync()methods to always return structured data jest-test-result: Add duration property to JSON test output
- breaking
jest-watcher: Make
PatternPromptclass to takeentityNameas third constructor parameter instead ofthis._entityName - breaking
jest-worker: Allow only absolute
workerPath - breaking
jest-worker: Default to advanced serialization when using child process workers
pretty-format: New
maxWidthparameter
Fixes
*: Use
sha256instead ofmd5as hashing algortihm for compatibility with FIPS systems- breaking
babel-jest: Pass
rootDirasrootin Babel's options expect: Move typings of
.not,.rejectsand.resolvesmodifiers outside ofMatchersinterfaceexpect: Throw useful error if
expect.extendis called with invalid matchersexpect: Fix
iterableEqualityignores other propertiesexpect: Fix print for the
closeTomatcherjest-changed-files: Improve
changedFilesWithAncestorpattern for Mercurial SCMjest-circus, @jest/types: Disallow undefined value in
TestContexttypejest-config: Correctly detect CI environment and update snapshots accordingly
jest-config: Pass
moduleTypestots-nodeto enforce CJS when transpiling- breaking
jest-config: Add
mjsandcjsto defaultmoduleFileExtensionsconfig jest-config, jest-haste-map: Allow searching for tests in
node_modulesby exposingretainAllFiles- breaking
jest-core: Exit with status
1if no tests are found with--findRelatedTestsflag jest-core: Do not report unref-ed subprocesses as open handles
jest-each:
%#is not replaced with index of the test casejest-each: Fixes error message with incorrect count of missing arguments
jest-environment-jsdom: Make
jsdomaccessible to extending environments againjest-environment-jsdom: Log JSDOM errors more cleanly
jest-environment-node: Add
MessageChannel,MessageEventto globalsjest-environment-node: Add
structuredCloneto globals- breaking
@jest/expect-utils: Fix false positives when looking for
undefinedprop jest-haste-map: Don't use partial results if file crawl errors
jest-haste-map: Make watchman existence check lazy+async
- breaking
jest-jasmine2, jest-types: Move all
jasminespecific types from@jest/typesto its own package jest-jasmine2: Do not set
durationto0for skipped testsjest-matcher-utils: Pass maxWidth to
pretty-formatto avoid printing every element in arrays by defaultjest-mock: Fix function overloads for
spyOnto allow more correct type inference in complex objectjest-mock: Handle overridden
Function.nameproperty@jest/reporters: Notifications generated by the
--notifyflag are no longer persistent in GNOME Shell.@jest/reporters: Move missing icon file which is needed for
NotifyReporterclass.@jest/reporters: Update
v8-to-istanbuljest-resolver: Call custom resolver with core node.js modules
jest-runner: Correctly resolve
source-map-supportjest-worker: Fix
Farmexecution results memory leak
Chore & Maintenance
- breaking
*: Drop support for Node v10 and v15 and target first LTS
16.13.0 - breaking
*: Drop support for
typescript@3.8, minimum version is now4.3(#11142, #12648) - breaking
babel-jest: Only export
createTransformer - breaking
expect: Remove support for importing
build/utils - breaking
expect: Migrate to ESM
- breaking
expect: Snapshot matcher types are moved to
@jest/expect - breaking
jest-config: Remove
getTestEnvironmentexport - breaking
jest-config: Rename config option
nametoid - breaking
jest-environment-jsdom: Migrate to ESM
- breaking
jest-environment-node: Migrate to ESM
- breaking
jest-jasmine2, jest-runtime: Use
Symbolto passjest.setTimeoutvalue instead ofjasminespecific logic - breaking
jest-phabricator: Migrate to ESM
- breaking
jest-resolve: Make
requireResolveFunctionargument mandatory - breaking
jest-runner: Remove some type exports from
@jest/test-result - breaking
jest-runner: Second argument to constructor (
Context) is not optional - breaking
jest-serializer: Deprecate package in favour of using
v8APIs directly - breaking
jest-snapshot: Migrate to ESM
- breaking
jest-types: Remove
Config.GlobandConfig.Path
Performance
- breaking
jest-haste-map: Default to
nodecrawler over shelling out tofindifwatchmanis not enabled