Delightful JavaScript Testing.
[jest-circus]
Add a waitBeforeRetry
option to jest.retryTimes
(#14738)[jest-circus, jest-jasmine2]
Allow setupFilesAfterEnv
to export an async function (#10962)[jest-config]
Loads config file from provided path in package.json
(#14044)[jest-config]
Allow loading jest.config.cts
files (#14070)[@jest/core]
Group together open handles with the same stack trace (#13417, & #14789)[@jest/core]
[BREAKING] Changed --filter
to accept an object with shape { filtered: Array<string> }
to match documentation (#13319)[@jest/environment-jsdom-abstract]
Introduce new package which abstracts over the jsdom
environment, allowing usage of custom versions of JSDOM (#14717)[jest-environment-node]
Update jest environment with dispose symbols Symbol
(#14888 & #14909)[jest-mock]
Add support for the Explicit Resource Management proposal to use the using
keyword with jest.spyOn(object, methodName)
(#14895)[jest-runtime]
Support import.meta.filename
and import.meta.dirname
(available from Node 20.11)[jest-circus]
Replace recursive makeTestResults
implementation with iterative one (#14760)[jest-circus]
Omit expect.hasAssertions()
errors if a test already has errors (#14866)[jest-cli]
[BREAKING] Validate CLI flags that require arguments receives them (#14783)[jest-config]
Support testTimeout
in project config (#14697)[jest-config]
Support coverageReporters
in project config (#14697)[jest-config]
Allow reporters
in project config (#14768)[pretty-format]
[BREAKING] Print ArrayBuffer
and DataView
correctly (#14290)[jest-haste-map]
Only spawn one process to check for watchman
installation (#14826)[*]
[BREAKING] Upgrade to glob@10
(#14509)[*]
Use TypeError
over Error
where appropriate (#14799)[jest-schemas]
Upgrade @sinclair/typebox
(#14775)[docs]
Append to NODE_OPTIONS
, not overwrite (#14730)[docs]
Updated .toHaveBeenCalled()
documentation to correctly reflect its functionality (#14842)Full Changelog: https://github.com/jestjs/jest/compare/v30.0.0-alpha.2...v30.0.0-alpha.3
[jest-circus, jest-cli, jest-config]
Add waitNextEventLoopTurnForUnhandledRejectionEvents
flag to minimise performance impact of correct detection of unhandled promise rejections introduced in #14315 (#14681)[@jest/core]
Add perfStats
to surface test setup overhead (#14622)[jest-config]
Support testTimeout
in project config (#14697)[@jest/expect-utils]
[BREAKING] exclude non-enumerable in object matching (#14670)[@jest/expect-utils]
Fix comparison of URL
(#14672)[@jest/expect-utils]
Check Symbol
properties in equality (#14688)[expect]
[BREAKING] Remove .toBeCalled()
, .toBeCalledTimes()
, .toBeCalledWith()
, .lastCalledWith()
, .nthCalledWith()
, .toReturn()
, .toReturnTimes()
, .toReturnWith()
, .lastReturnedWith()
, .nthReturnedWith()
and .toThrowError()
matcher aliases (#14632)[jest-config, @jest/core, jest-util]
Upgrade ci-info
(#14655)[jest-mock]
[BREAKING] Remove MockFunctionMetadataType
, MockFunctionMetadata
and SpyInstance
types (#14621)[jest-transform]
Upgrade write-file-atomic
(#14274)[jest-util]
Upgrade picomatch
to v3 (#14653)Full Changelog: https://github.com/jestjs/jest/compare/v30.0.0-alpha.1...v30.0.0-alpha.2
[jest-config]
[BREAKING] Add mts
and cts
to default moduleFileExtensions
config (#14369)[jest-config]
[BREAKING] Update testMatch
and testRegex
default option for supporting mjs
, cjs
, mts
, and cts
(#14584)[@jest/core]
[BREAKING] Group together open handles with the same stack trace (#13417, & #14543)[@jest/core, @jest/test-sequencer]
[BREAKING] Exposes globalConfig
& contexts
to TestSequencer
(#14535, & #14543)[jest-environment-jsdom]
[BREAKING] Upgrade JSDOM to v22 (#13825)[@jest/fake-timers]
[BREAKING] Upgrade @sinonjs/fake-timers
to v11 (#14544)[@jest/fake-timers]
Exposing new modern timers function advanceTimersToFrame()
which advances all timers by the needed milliseconds to execute callbacks currently scheduled with requestAnimationFrame
(#14598)[jest-runtime]
Exposing new modern timers function jest.advanceTimersToFrame()
from @jest/fake-timers
(#14598)[@jest/schemas]
Upgrade @sinclair/typebox
to v0.31 (#14072)[@jest/types]
test.each()
: Accept a readonly (as const
) table properly (#14565)[jest-snapshot]
[BREAKING] Add support for Error causes in snapshots (#13965)[jest-snapshot]
Support Prettier 3 (#14566)[pretty-format]
[BREAKING] Do not render empty string children (''
) in React plugin (#14470)[babel-plugin-jest-hoist]
Use denylist
instead of the deprecated blacklist
for Babel 8 support (#14109)[expect]
Check error instance type for toThrow/toThrowError
(#14576)[jest-circus]
[BREAKING] Prevent false test failures caused by promise rejections handled asynchronously (#14315)[jest-circus, jest-expect, jest-snapshot]
Pass test.failing
tests when containing failing snapshot matchers (#14313)[jest-config]
Make sure to respect runInBand
option (#14578)[@jest/expect-utils]
Fix comparison of DataView
(#14408)[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-util]
Make sure isInteractive
works in a browser (#14552)[pretty-format]
[BREAKING] Print ArrayBuffer
and DataView
correctly (#14290)[jest-cli]
When specifying paths on the command line, only match against the relative paths of the test files (#12519)
testPathPattern
configuration option to testPathPatterns
, which now takes a list of patterns instead of the regex.--testPathPattern
is now --testPathPatterns
[jest-reporters, jest-runner]
Unhandled errors without stack get correctly logged to console (#14619)[*]
[BREAKING] Drop support for Node.js versions 14 and 19 (#14460)[*]
[BREAKING] Drop support for [email protected]
, minimum version is now 5.0
(#14542)[*]
Depend on exact versions of monorepo dependencies instead of ^
range (#14553)[*]
[BREAKING] Add ESM wrapper for all of Jest's modules (#14661)[babel-jest, babel-preset-jest]
[BREAKING] Increase peer dependency of @babel/core
to ^7.11
(#14109)[jest-cli, jest-config, @jest/types]
[BREAKING] Remove deprecated --init
argument (#14490)[docs]
Fix typos in CHANGELOG.md
and packages/jest-validate/README.md
(#14640)[docs]
Don't use alias matchers in docs (#14631)Full Changelog: https://github.com/jestjs/jest/compare/v29.7.0...v30.0.0-alpha.1
[create-jest]
Add npm init
/ yarn create
initialiser for Jest projects (#14465)[jest-validate]
Allow deprecation warnings for unknown options (#14499)[jest-resolver]
Replace unmatched capture groups in moduleNameMapper
with empty string instead of undefined
(#14507)[jest-snapshot]
Allow for strings as well as template literals in inline snapshots (#14465)[@jest/test-sequencer]
Calculate test runtime if perStats.duration
is missing (#14473)[@jest/create-cache-key-function]
Cache access of NODE_ENV
and BABEL_ENV
(#14455)[jest-cli]
Move internal config initialisation logic to the create-jest
package (#14465)Full Changelog: https://github.com/jestjs/jest/compare/v29.6.4...v29.7.0
[jest-core]
Fix typo in scheduleAndRun
performance marker (#14434)[jest-environment-node]
Make sure atob
and btoa
are writeable in Node 20 (#14446)[jest-worker]
Additional error wrapper for parentPort.postMessage
to fix unhandled DataCloneError
. (#14437)Full Changelog: https://github.com/jestjs/jest/compare/v29.6.3...v29.6.4
[expect, @jest/expect-utils]
ObjectContaining
support symbol
as key (#14414)[expect]
Remove @types/node
from dependencies (#14385)[jest-core]
Use workers in watch mode by default to avoid crashes (#14059 & #14085).[jest-reporters]
Update istanbul-lib-instrument
dependency to v6. (#14401)[jest-mock]
Revert #13692 as it was a breaking change (#14429)[jest-mock]
Revert #13866 as it was a breaking change (#14429)[jest-mock]
Revert #13867 as it was a breaking change (#14429)[@jest/reporters]
Marks Reporter's hooks as optional (#14433)[jest-runtime]
Fix dynamic ESM import module bug when loaded module through jest.isolateModulesAsync
(#14397)[jest-changed-files, jest-circus, jest-console, @jest/core, @jest/runtime, @jest/transform]
Use invariant
and notEmpty
from jest-util
rather than own internal (#14366)Full Changelog: https://github.com/jestjs/jest/compare/v29.6.2...v29.6.3
[jest-circus]
Fix snapshot matchers in concurrent tests when nr of tests exceeds maxConcurrency
(#14335)[@jest/core]
When running global setup and teardown, do not try to change the message
property of the thrown error object when the message
property is unwritable (#14113)[jest-snapshot]
Move @types/prettier
from dependencies
to devDependencies
(#14328)[jest-snapshot]
Throw an explicit error if Prettier v3 is used (#14367)[jest-reporters]
Add "skipped" and "todo" symbols to Github Actions Reporter (#14309)[@jest/core]
Use pluralize
from jest-util
rather than own internal (#14322)Full Changelog: https://github.com/jestjs/jest/compare/v29.6.1...v29.6.2
[jest-circus, jest-snapshot]
Add support for snapshot matchers in concurrent tests (#14139)[jest-cli]
Include type definitions to generated config files (#14078)[jest-snapshot]
Support arrays as property matchers (#14025)[jest-core, jest-circus, jest-reporter, jest-runner]
Added support for reporting about start individual test cases using jest-circus (#14174)[jest-circus]
Prevent false test failures caused by promise rejections handled asynchronously (#14110)[jest-config]
Handle frozen config object (#14054)[jest-config]
Allow coverageDirectory
and collectCoverageFrom
in project config (#14180)[jest-core]
Always use workers in watch mode to avoid crashes (#14059).[jest-environment-jsdom, jest-environment-node]
Fix assignment of customExportConditions
via testEnvironmentOptions
when custom env subclass defines a default value (#13989)[jest-matcher-utils]
Fix copying value of inherited getters (#14007)[jest-mock]
Tweak typings to allow jest.replaceProperty()
replace methods (#14008)[jest-mock]
Improve user input validation and error messages of spyOn
and replaceProperty
methods (#14087)[jest-runtime]
Bind jest.isolateModulesAsync
to this
(#14083)[jest-runtime]
Forward wrapperLength
to the Script
constructor as columnOffset
for accurate debugging (#14148)[jest-runtime]
Guard _isMockFunction
access with in
(#14188)[jest-snapshot]
Fix a potential bug when not using prettier and improve performance (#14036)[@jest/transform]
Do not instrument .json
modules (#14048)[jest-worker]
Restart a shut down worker before sending it a task (#14015)[*]
Update semver
dependency to get vulnerability fix (#14262)[docs]
Updated documentation for the --runTestsByPath
CLI command (#14004)[docs]
Updated documentation regarding the synchronous fallback when asynchronous code transforms are unavailable (#14056)[docs]
Update jest statistics of use and downloads in website Index.Full Changelog: https://github.com/jestjs/jest/compare/v29.5.0...v29.6.0
[jest-changed-files]
Support Sapling (#13941)[jest-circus, @jest/cli, jest-config]
Add feature to randomize order of tests via CLI flag or through the config file(#12922)[jest-cli, jest-config, @jest/core, jest-haste-map, @jest/reporters, jest-runner, jest-runtime, @jest/types]
Add workerThreads
configuration option to allow using worker threads for parallelization (#13939)[jest-cli]
Export yargsOptions
(#13970)[jest-config]
Add openHandlesTimeout
option to configure possible open handles warning. (#13875)[@jest/create-cache-key-function]
Allow passing length
argument to createCacheKey()
function and set its default value to 16
on Windows (#13827)[jest-message-util]
Add support for AggregateError (#13946 & #13947)[jest-message-util]
Add support for Error causes in test
and it
(#13935 & #13966)[jest-reporters]
Add summaryThreshold
option to summary reporter to allow overriding the internal threshold that is used to print the summary of all failed tests when the number of test suites surpasses it (#13895)[jest-runtime]
Expose @sinonjs/fake-timers
async APIs functions advanceTimersByTimeAsync(msToRun)
(tickAsync(msToRun)
), advanceTimersToNextTimerAsync(steps)
(nextAsync
), runAllTimersAsync
(runAllAsync
), and runOnlyPendingTimersAsync
(runToLastAsync
) (#13981)[jest-runtime, @jest/transform]
Allow V8 coverage provider to collect coverage from files which were not loaded explicitly (#13974)[jest-snapshot]
Add support to cts
and mts
TypeScript files to inline snapshots (#13975)[jest-worker]
Add start
method to worker farms (#13937)[jest-worker]
Support passing a URL as path to worker (#13982)[babel-plugin-jest-hoist]
Fix unwanted hoisting of nested jest
usages (#13952)[jest-circus]
Send test case results for todo
tests (#13915)[jest-circus]
Update message printed on test timeout (#13830)[jest-circus]
Avoid creating the word "testfalse" when takesDoneCallback
is false
in the message printed on test timeout AND updated timeouts test (#13954)[jest-environment-jsdom]
Stop setting document
to null
on teardown (#13972)[@jest/expect-utils]
Update toStrictEqual()
to be able to check jest.fn().mock.calls
(#13960)[@jest/test-result]
Allow TestResultsProcessor
type to return a Promise (#13950)[jest-snapshot]
Remove dependency on jest-haste-map
(#13977)Full Changelog: https://github.com/facebook/jest/compare/v29.4.3...v29.5.0