babel-jest
30.5.2 · 18 Sep 2026MIT71.6M / weekRepositoryHomepagenpmAtom feed
22.4.4 is the newest release of 22.x.
In short
7 breaking1 removed30 new31 fixed18 internal
- breaking
expect: Replace identity equality with Object.is in toBe matcher
- breaking
jest-environment-jsdom: Upgrade to JSDOM@11
- breaking
jest-environment-*: Add Async Test Environment APIs, dispose is now teardown
- breaking
jest-snapshot: Concatenate name of test and snapshot
- breaking
jest-cli: Fail if no tests are found
- breaking
jest-snapshot: Add a serializer for
jest.fnto allow a snapshot of a jest mock - breaking
*: Drop support for Node.js version 4
- removed
jest-worker: Remove
debugandinspectflags from the arguments sent to the child
Release note
Fixes
jest-resolve: Use
module.builtinModulesasBUILTIN_MODULESwhen it exists- removed
jest-worker: Remove
debugandinspectflags from the arguments sent to the child jest-config: Use all
--testPathPatternand<regexForTestFiles>args intestPathPatternjest-cli: Do not support
--watchinside non-version-controlled environmentsjest-config: Escape Windows path separator in testPathPattern CLI arguments
jest-jasmine: Register sourcemaps as node environment to improve performance with jsdom
pretty-format: Do not call toJSON recursively
pretty-format: Fix errors when identity-obj-proxy mocks CSS Modules
babel-jest: Fix support for namespaced babel version 7
expect: Fix .toThrow for promises
jest-docblock: Pragmas should preserve urls
jest-cli: Check if
npm_lifecycle_scriptcalls Jest directlyjest-cli: Fix --showConfig to show all configs
jest-cli: Throw if
maxWorkersdoesn't have a valuejest-cli: Use
fs.realpathSync.nativeif availablejest-config: Fix
--passWithNoTestsjest-config: Support
rootDirtag in testEnvironmentjest-editor-support: Fix
--showConfigto support jest 20 and jest 21jest-editor-support: Fix editor support test for node 4
jest-mock: Support mocking constructor in
mockImplementationOncejest-runtime: Fix manual user mocks not working with custom resolver
jest-util: Fix
runOnlyPendingTimersforsetTimeoutinsidesetImmediatejest-message-util: Always remove node internals from stacktraces
jest-resolve: Changes method of determining builtin modules to include missing builtins
pretty-format: Prevent error in pretty-format for window in jsdom test env
jest-resolve: Preserve module identity for symlinks
jest-config: Include error message for
presetjsonpretty-format: Throw
PrettyFormatPluginErrorif a plugin halts with an exceptionexpect: Keep the stack trace unchanged when
PrettyFormatPluginErroris thrown by pretty-formatjest-environment-jsdom: Fix asynchronous test will fail due to timeout issue.
jest-cli: Fix
--onlyChangedpath case sensitivity on Windows platformjest-runtime: Use realpath to match transformers
- breaking
expect: Replace identity equality with Object.is in toBe matcher
Features
jest-config: Add Global Setup/Teardown options
jest-config: Add
testEnvironmentOptionsto apply to jsdom options or node context.jest-jasmine2: Update Timeout error message to
jest.timeoutand display current timeout valuejest-runner: Enable experimental detection of leaked contexts
jest-cli: Add combined coverage threshold for directories.
jest-mock: Add
timestampsto mock state.eslint-plugin-jest: Add
prefer-to-have-lengthlint rule.- breaking
jest-environment-jsdom: Upgrade to JSDOM@11
- breaking
jest-environment-*: Add Async Test Environment APIs, dispose is now teardown
jest-cli: Add an option to clear the cache
babel-plugin-jest-hoist: Improve error message, that the second argument of
jest.mockmust be an inline function- breaking
jest-snapshot: Concatenate name of test and snapshot
- breaking
jest-cli: Fail if no tests are found
jest-diff: Highlight only last of odd length leading spaces
jest-docblock: Add
docblock.print()jest-docblock: Add
stripjest-docblock: Preserve leading whitespace in docblock comments
jest-docblock: Remove leading newlines from
parswWithComments().commentsjest-editor-support: Add Snapshots metadata
jest-editor-support: Adds an 'any' to the typedef for
updateFileWithJestStatusjest-editor-support: Better monorepo support
jest-environment-jsdom: Add simple rAF polyfill in jsdom environment to work with React 16
jest-environment-node: Implement node Timer api
jest-jasmine2: Add testPath to reporter callbacks
jest-mock: Added support for naming mocked functions with
.mockName(value)and.mockGetName()jest-runtime: Add
module.loaded, and makemodule.requirenot enumerablejest-runtime: Add
module.parentjest-runtime: Support sourcemaps in transformers
- breaking
jest-snapshot: Add a serializer for
jest.fnto allow a snapshot of a jest mock jest-worker: Initial version of parallel worker abstraction, say hello!
jest-jasmine2: Add
testLocationInResultsflag to add location information per spec to test resultsjest-environment-jsdom: Update JSOM to 11.4, which includes built-in support for
requestAnimationFramejest-cli: Hide watch usage output when running on non-interactive environments
jest-snapshot: Promises support for
toThrowErrorMatchingSnapshotjest-cli: Explain which snapshots are obsolete
Chore & Maintenance
- breaking
*: Drop support for Node.js version 4