@jest/core
30.5.2 · 18 Sep 2026MIT60.2M / weekRepositoryHomepagenpmAtom feed
118 stable releases, newest first, by release line. Notes are quoted as the maintainers published them.
- 25.x
25.2.7
3 Apr 2020jest-matcher-utils: Replace accessors with values to avoid calling setters in object descriptors when computing diffs for error reporting
@jest/watcher: Correct return type of
shouldRunTestSuiteforJestHookEmitter
25.2.6
2 Apr 2020Maintenance only: docs, tests, build or refactoring. Nothing changes in how you use it.
25.2.3
26 Mar 2020*: Verify all packages are properly downleveled for older versions of TypeScript
25.2.2
26 Mar 2020jest-environment-node: Remove
getVmContextfrom Node env on older versions of Nodejest-runtime: Return constructable class from
require('module')
25.2.1
26 Mar 2020*: Downlevel TypeScript definitions files for compatibility with TS<3.8
25.2.0
25 Mar 2020- breaking
jest-haste-map: Remove
mapperoption jest-config: Support ESM config files with
.jsextension (#9573).jest-runtime: Override
module.createRequireto return a Jest-compatiblerequirefunction
Features
jest-config: Support ESM config files with
.jsextension (#9573).jest-runtime: Override
module.createRequireto return a Jest-compatiblerequirefunction- breaking
jest-haste-map: Remove
mapperoption *: Support array of paths for
moduleNameMapperaliasesjest-reporters: Adds ability to pass options to the istanbul-reporter through
coverageReportersjest-runtime: Require stack when a module cannot be resolved
jest-transform:
writeCacheFileno longer callsfsync
Fixes
expect: Handle readonly properties correctly
jest-cli: Set
coverageProvidercorrectly when provided in configjest-cli: Allow specifying
.cjsand.mjsconfig files by--configCLI optionjest-cli: Update yargs to fix CLI flag overriding
jest-config: Treat
setupFilesAfterEnvlikesetupFileswhen normalizing configs against presetsjest-config: Support
.mjsconfig files on Windows as welljest-config: Verify
rootDirand allrootsare directoriesjest-config: Ensure pattern of
replacePosixSepis a stringjest-haste-map: Fix crash on unix based systems without find
jest-jasmine2: Fix
--testNamePatternmatching withconcurrenttestsjest-matcher-utils: Fix diff highlight of symbol-keyed object.
@jest/reporters: Notifications should be fire&forget rather than having a timeout
jest-resolve: Fix module identity preservation with symlinks and browser field resolution
jest-resolve: Do not confuse directories with files
jest-resolve:
moduleNameMappershould take precedence over Node core modulesjest-runtime: Reset
isolateModulesif it failsjest-runtime: Yarn PnP errors displayed to the user
jest-snapshot: Downgrade semver to v6 to support node 8
jest-snapshot: Properly indent new snapshots in the presences of existing ones
jest-transform: Correct sourcemap behavior for transformed and instrumented code
jest-transform: Allow instrumentation of transformed files with weird file extensions
@jest/types: Make
ConfigGlobalsan interface to allow for declaration merging.pretty-format: Export
OldPlugintype
Performance
jest-haste-map: Reduce number of
lstatcalls in node crawler
25.1.0
22 Jan 2020- breaking
jest-config: Set default display name color based on runner
- breaking
jest-config: Support
.mjsconfig files - breaking
jest-diff: Export as ECMAScript module
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
25.0.0
22 Aug 2019- 24.x
24.9.0
16 Aug 2019expect: Highlight substring differences when matcher fails, part 1
expect: Highlight substring differences when matcher fails, part 2
expect: Improve report when mock-spy matcher fails, part 1
Features
expect: Highlight substring differences when matcher fails, part 1
expect: Highlight substring differences when matcher fails, part 2
expect: Improve report when mock-spy matcher fails, part 1
expect: Improve report when mock-spy matcher fails, part 2
expect: Improve report when mock-spy matcher fails, part 3
expect: Improve report when mock-spy matcher fails, part 4
expect: Throw matcher error when received cannot be jasmine spy
expect: Improve report when negative CalledWith assertion fails
expect: Improve report when positive CalledWith assertion fails
expect: Display equal values for ReturnedWith similar to CalledWith
expect, jest-snapshot: Change color from green for some args in matcher hints
jest-snapshot: Highlight substring differences when matcher fails, part 3
jest-core: Improve report when snapshots are obsolete
jest-cli: Improve chai support (with detailed output, to match jest exceptions)
*: Manage the global timeout with
--testTimeoutcommand line argument.pretty-format: Render custom displayName of memoized components
jest-validate: Allow
maxWorkersas part of thejest.config.jsjest-runtime: Allow passing configuration objects to transformers
@jest/core, @jest/test-sequencer: Support async sort in custom
testSequencerjest-runtime, @jest/fake-timers: Add
jest.advanceTimersToNextTimer@jest-transform: Extract transforming require logic within
jest-coreinto@jest-transformjest-matcher-utils: Add color options to
matcherHintjest-circus/jest-jasmine2: Give clearer output for Node assert errors
jest-runner: Export all types in the type signature of
jest-runner
Fixes
jest-cli: Detect side-effect only imports when running
--onlyChangedor--changedSincejest-cli: Allow
--maxWorkersto work with % input againbabel-plugin-jest-hoist: Expand list of whitelisted globals in global mocks
jest-core: Make watch plugin initialization errors look nice
jest-snapshot: Prevent inline snapshots from drifting when inline snapshots are updated
jest-haste-map: Don't throw on missing mapper in Node crawler
jest-core: Fix incorrect
passWithNoTestswarningjest-snapshots: Fix test retries that contain snapshots
jest-mock: Fix incorrect assignments when restoring mocks in instances where they originally didn't exist
expect: Fix stack overflow when matching objects with circular references
jest-haste-map: Workaround a node >=12.5.0 bug that causes the process not to exit after tests have completed and cancerous memory growth
Performance
jest-watcher: Minor optimization for JestHook
@jest/reporters: Prevent runaway CPU useage with
--notifyon macOS
24.8.0
5 May 2019jest-circus: Bind to Circus events via an optional event handler on any custom env
expect: Improve report when matcher fails, part 15
jest-cli: Update
--forceExitand "did not exit for one second" message colors
Features
jest-circus: Bind to Circus events via an optional event handler on any custom env
expect: Improve report when matcher fails, part 15
jest-cli: Update
--forceExitand "did not exit for one second" message colorsexpect: Improve report when matcher fails, part 16
jest-runner: Pass docblock pragmas to TestEnvironment constructor
expect: Improve report when matcher fails, part 17
expect: Improve report when matcher fails, part 18
expect: Improve report when matcher fails, part 19
Fixes
jest-each: Fix bug with placeholder values
jest-snapshot: Inline snapshots: do not indent empty lines
@jest/runtime, @jest/transform: Allow custom transforms for JSON dependencies
jest-core: Make
detectOpenHandlesimplyrunInBandjest-haste-map: Fix the
mapperoption which was incorrectly ignoredjest-jasmine2: Fix describe return value warning being shown if the describe function throws
jest-environment-jsdom: Re-declare global prototype of JSDOMEnvironment
jest-snapshot: Handle arrays when merging snapshots
expect: Extract names of async and generator functions
jest-runtime: Fix virtual mocks not being unmockable after previously being mocked
jest-transform: Replace special characters in transform cache filenames to support Windows
jest-config: Allow exactly one project
Performance
jest-runtime: Fix module registry memory leak
jest-resolve: Optimize resolve module path
jest-resolve: Cache current directory
jest-get-type: Simplify checking for primitive
24.7.1
4 Apr 2019@jest/config: Normalize
testSequencerto its absolute path@jest/console: Print to stderr when calling
console.error,console.warnorconsole.assertusing thejest-runtimeCLI
24.7.0
3 Apr 2019- removed
expect: Remove repetition of matcherName and options in matchers
@jest/core, @jest/test-sequencer: Move
testSequencerto individual package@jest/test-sequencer@jest/core, jest-cli, jest-config: Add option
testSequencerallow user use custom sequencer.
Features
@jest/core, @jest/test-sequencer: Move
testSequencerto individual package@jest/test-sequencer@jest/core, jest-cli, jest-config: Add option
testSequencerallow user use custom sequencer.
Fixes
expect: Add negative equality tests for iterables
jest-haste-map: Resolve fs watcher EMFILE error
Chore & Maintenance
- removed
expect: Remove repetition of matcherName and options in matchers
24.6.0
1 Apr 2019: Improve report when matcher fails, part 13
@jest/core: Filter API pre-filter setup hook
jest-snapshot: Improve report when matcher fails, part 14
Features
: Improve report when matcher fails, part 13
@jest/core: Filter API pre-filter setup hook
jest-snapshot: Improve report when matcher fails, part 14
@jest/reporter: Display todo and skip test descriptions when verbose is true
jest-runner: Support default exports for test environments
pretty-format: Support React.Suspense
jest-snapshot: Indent inline snapshots
jest-config: Support colors in
displayNameconfiguration
Fixes
jest-circus: Fix test retries with beforeAll/beforeEach failures
expect: Fix circular references in iterable equality
jest-changed-files: Change method of obtaining git root
jest-each: Fix test function type
jest-fake-timers:
getTimerCountnot taking immediates and ticks into accountjest-runtime: Allow json file as manual mock
pretty-format: Print
BigIntas a readable number instead of{}jest-core: Fix ability to transform dependencies required from globalSetup script
@jest/reporters: Fix Cannot read property converageData of null
jest-worker:
JEST_WORKER_IDstarts at 1jest-config: Use default cwd even if config contains a cwd property
: Remove internal peer dependencies
: Remove internal peer dependencies
: Remove internal peer dependencies
jest-resolve: Fix requireActual with moduleNameMapper
jest-haste-map: Fix haste map duplicate detection in watch mode
Performance
jest-haste-map: Optimize haste map data structure for serialization/deserialization
jest-haste-map: Avoid persisting haste map or processing files when not changed
jest-core: Improve performance of SearchSource.findMatchingTests by 15%
jest-resolve: Optimize internal cache lookup performance
jest-core: Dramatically improve watch mode performance
jest-transform: Cache regular expression instead of creating anew for every file in ScriptTransformer
jest-core: Fix memory leak of source map info and minor performance improvements
jest-console: Fix memory leak by releasing console output reference when printed to stdout
jest-runtime: Use
Mapinstead ofObjectfor module registry
24.5.0
12 Mar 2019jest-haste-map: Expose
throwOnModuleCollisionviaconfig.haste
Features
jest-haste-map: Expose
throwOnModuleCollisionviaconfig.haste
24.4.0
11 Mar 2019jest-resolve: Now supports PnP environment without plugins
expect: Compare DOM nodes even if there are multiple Node classes
jest-worker:
worker.getStdout()can returnnull
Features
jest-resolve: Now supports PnP environment without plugins
Fixes
expect: Compare DOM nodes even if there are multiple Node classes
jest-worker:
worker.getStdout()can returnnulljest-worker: Re-attach stdout and stderr from new processes/threads created after retries
jest-reporters/jest-runner: Serialize
changedFilespassed to workers
24.3.1
7 Mar 201924.3.0
7 Mar 2019- removed
expect: Remove duck typing and obsolete browser support code when comparing DOM nodes and use DOM-Level-3 API instead
- security
jest-cli: Fix prototype pollution vulnerability in dependency
: Improve report when matcher fails, part 10
We skipped 24.2.0 because a draft was accidentally published. Please use
24.3.0or a newer version instead.Features
: Improve report when matcher fails, part 10
: Improve report when matcher fails, part 11
: Improve report when matcher fails, part 12
: Improve report when matcher fails, part 7
: Improve report when matcher fails, part 8
: Improve report when matcher fails, part 9
jest-circus/jest-jasmine2: Warn if describe returns a value
jest-config: Print error information on preset normalization error
jest-get-type: Add
isPrimitivefunctionjest-haste-map: Add
skipPackageJsonoptionjest-util: Add
isPromisepretty-format: Support
React.memo
Fixes
expect: Fix
toStrictEqualnot considering arrays with objects having undefined values correctlyexpect: Fix custom async matcher stack trace
expect: Fix non-object received value in toHaveProperty (#7986, #8067)
expect: Fix non-symmetric equal for Number
- removed
expect: Remove duck typing and obsolete browser support code when comparing DOM nodes and use DOM-Level-3 API instead
jest-changed-files: Fix
getChangedFilesFromRootsto not return parts of the commit messages as if they were files, when the commit messages contained multiple paragraphsjest-changed-files: Fix pattern for HG changed files
jest-changed-files: Improve default file selection for Mercurial repos
jest-circus: Fix bug with test.only
: Throw explicit error when errors happen after test is considered complete
- security
jest-cli: Fix prototype pollution vulnerability in dependency
jest-cli: Refactor
-oand--coveragecombinedjest-environment-node: Add missing globals: TextEncoder and TextDecoder
jest-haste-map: Enforce uniqueness in names (mocks and haste ids)
: Throw explicit error when errors happen after test is considered complete
jest-mock: Adds a type check to
prototypeto allow mocks of objects with a primitiveprototypeproperty.jest-transform: Normalize config and remove unnecessary checks, convert
TestUtils.jsto TypeScriptMake sure to not fail if unable to assign
toStringTagto theprocessobject, which is read only in Node 12jest-validate: Fix validating async functions
jest-worker: Fix
jest-workerwhen using pre-allocated jobsstatic: Remove console log '-' on the front page
Performance
jest-haste-map: Optimize haste map tracking of deleted files with Watchman.