Update jest monorepo to v29 (major)
This MR contains the following updates:
Package | Type | Update | Change |
---|---|---|---|
@types/jest (source) | devDependencies | major | ^24.0.15 -> ^29.0.0 |
jest (source) | devDependencies | major | ^24.8 -> ^29.0.0 |
Release Notes
facebook/jest (jest)
v29.6.1
Fixes
v29.6.0
Features
-
[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)
Fixes
-
[jest-circus]
Prevent false test failures caused by promise rejections handled asynchronously (#14110) -
[jest-config]
Handle frozen config object (#14054) -
[jest-config]
AllowcoverageDirectory
andcollectCoverageFrom
in project config (#14180) -
[jest-core]
Always use workers in watch mode to avoid crashes (#14059). -
[jest-environment-jsdom, jest-environment-node]
Fix assignment ofcustomExportConditions
viatestEnvironmentOptions
when custom env subclass defines a default value (#13989) -
[jest-matcher-utils]
Fix copying value of inherited getters (#14007) -
[jest-mock]
Tweak typings to allowjest.replaceProperty()
replace methods (#14008) -
[jest-mock]
Improve user input validation and error messages ofspyOn
andreplaceProperty
methods (#14087) -
[jest-runtime]
Bindjest.isolateModulesAsync
tothis
(#14083) -
[jest-runtime]
ForwardwrapperLength
to theScript
constructor ascolumnOffset
for accurate debugging (#14148) -
[jest-runtime]
Guard_isMockFunction
access within
(#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)
Chore & Maintenance
-
[*]
Updatesemver
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.
v29.5.0
Features
-
[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]
AddworkerThreads
configuration option to allow using worker threads for parallelization (#13939) -
[jest-cli]
ExportyargsOptions
(#13970) -
[jest-config]
AddopenHandlesTimeout
option to configure possible open handles warning. (#13875) -
[@jest/create-cache-key-function]
Allow passinglength
argument tocreateCacheKey()
function and set its default value to16
on Windows (#13827) -
[jest-message-util]
Add support for AggregateError (#13946 & #13947) -
[jest-message-util]
Add support for Error causes intest
andit
(#13935 & #13966) -
[jest-reporters]
AddsummaryThreshold
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 functionsadvanceTimersByTimeAsync(msToRun)
(tickAsync(msToRun)
),advanceTimersToNextTimerAsync(steps)
(nextAsync
),runAllTimersAsync
(runAllAsync
), andrunOnlyPendingTimersAsync
(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 tocts
andmts
TypeScript files to inline snapshots (#13975) -
[jest-worker]
Addstart
method to worker farms (#13937) -
[jest-worker]
Support passing a URL as path to worker (#13982)
Fixes
-
[babel-plugin-jest-hoist]
Fix unwanted hoisting of nestedjest
usages (#13952) -
[jest-circus]
Send test case results fortodo
tests (#13915) -
[jest-circus]
Update message printed on test timeout (#13830) -
[jest-circus]
Avoid creating the word "testfalse" whentakesDoneCallback
isfalse
in the message printed on test timeout AND updated timeouts test (#13954) -
[jest-environment-jsdom]
Stop settingdocument
tonull
on teardown (#13972) -
[@jest/expect-utils]
UpdatetoStrictEqual()
to be able to checkjest.fn().mock.calls
(#13960) -
[@jest/test-result]
AllowTestResultsProcessor
type to return a Promise (#13950)
Chore & Maintenance
-
[jest-snapshot]
Remove dependency onjest-haste-map
(#13977)
v29.4.3
Features
-
[expect]
UpdatetoThrow()
to be able to use errorcause
s (#13606) -
[jest-core]
allow to useworkerIdleMemoryLimit
with only 1 worker orrunInBand
option (#13846) -
[jest-message-util]
Add support for errorcause
s (#13868 & #13912) -
[jest-runtime]
Revertimport assertions
for JSON modules as it's been relegated to Stage 2 (#13911)
Fixes
-
[@jest/expect-utils]
subsetEquality
should consider also an object's inherited string keys (#13824) -
[jest-mock]
Clear mock state whenjest.restoreAllMocks()
is called (#13867) -
[jest-mock]
PreventmockImplementationOnce
andmockReturnValueOnce
bleeding intowithImplementation
(#13888) -
[jest-mock]
Do not restore mocks whenjest.resetAllMocks()
is called (#13866)
v29.4.2
Features
-
[@jest/core]
Instrument significant lifecycle events withperformance.mark()
(#13859)
Fixes
-
[expect, @​jest/expect]
Provide type ofactual
as a generic argument toMatchers
to allow better-typed extensions (#13848) -
[jest-circus]
Added explicit mention of test failing becausedone()
is not being called in error message (#13847) -
[jest-runtime]
Handle CJS re-exports of node core modules from ESM (#13856) -
[jest-transform]
Downgradewrite-file-atomic
to v4 (#13853) -
[jest-worker]
Ignore IPC messages not intended for Jest (#13543)
Chore & Maintenance
-
[*]
make sure to exclude.eslintcache
from published module (#13832) -
[docs]
Cleanup incorrect links in CHANGELOG.md (#13857)
v29.4.1
Features
-
[expect, jest-circus, @​jest/types]
ImplementnumPassingAsserts
of testResults to track the number of passing asserts in a test (#13795) -
[jest-core]
Add newlines to JSON output (#13817) -
[@jest/reporters]
Automatic log folding in GitHub Actions Reporter (#13626)
Fixes
-
[@jest/expect-utils]
toMatchObject
diffs should includeSymbol
properties (#13810) -
[jest-runtime]
Handle missingreplaceProperty
(#13823) -
[@jest/types]
Add partial support fordone
callbacks in typings ofeach
(#13756)
v29.4.0
Features
-
[expect, @​jest/expect-utils]
Support custom equality testers (#13654) -
[jest-config, jest-worker]
Useos.availableParallelism
if available to calculate number of workers to spawn (#13738) -
[@jest/globals, jest-mock]
Addjest.replaceProperty()
that replaces property value (#13496) -
[jest-haste-map]
ignore Sapling vcs directories (.sl/
) (#13674) -
[jest-resolve]
Support subpath imports (#13705, #13723, #13777) -
[jest-runtime]
Addjest.isolateModulesAsync
for scoped module initialization of asynchronous functions (#13680) -
[jest-runtime]
Addjest.isEnvironmentTornDown
function (#13741) -
[jest-test-result]
Addedskipped
andfocused
status toFormattedTestResult
(#13700) -
[jest-transform]
Support for asynchronouscreateTransformer
(#13762)
Fixes
-
[jest-environment-node]
Fix non-configurable globals (#13687) -
[@jest/expect-utils]
toMatchObject
should handleSymbol
properties (#13639) -
[jest-mock]
FixmockReset
andresetAllMocks
undefined
return value(#13692) -
[jest-resolve]
Add global paths torequire.resolve.paths
(#13633) -
[jest-resolve]
Correct node core module detection when usingnode:
specifiers (#13806) -
[jest-runtime]
Support WASM files that import JS resources (#13608) -
[jest-runtime]
Use thescriptTransformer
cache injest-runner
(#13735) -
[jest-runtime]
Enforce import assertions when importing JSON in ESM (#12755 & #13805) -
[jest-snapshot]
Make sure to importbabel
outside of the sandbox (#13694) -
[jest-transform]
Ensure the correct configuration is passed to preprocessors specified multiple times in thetransform
option (#13770)
Chore & Maintenance
-
[@jest/fake-timers]
Update@sinonjs/fake-timers
(#13612) -
[docs]
Improve custom puppeteer example to prevent worker warnings (#13619)
v29.3.1
Fixes
-
[jest-config]
Do not warn aboutpreset
inProjectConfig
(#13583)
Performance
-
[jest-transform]
Defer creation of cache directory (#13420)
v29.3.0
Features
-
[jest-runtime]
Support WebAssembly (Wasm) imports in ESM modules (#13505)
Fixes
-
[jest-config]
Add config validation forprojects
option (#13565) -
[jest-mock]
Treat cjs modules as objects so they can be mocked (#13513) -
[jest-worker]
Throw an error instead of hanging when jest workers terminate unexpectedly (#13566)
Chore & Maintenance
-
[@jest/transform]
Updateconvert-source-map
(#13509) -
[docs]
MentiontoStrictEqual
in UsingMatchers docs. (#13560)
v29.2.2
Fixes
-
[@jest/test-sequencer]
Make sure sharding does not produce empty groups (#13476) -
[jest-circus]
Test marked astodo
are shown as todo when inside a focussed describe (#13504) -
[jest-mock]
Ensure mock resolved and rejected values are promises from correct realm (#13503) -
[jest-snapshot]
Don't highlight passing asymmetric property matchers in snapshot diff (#13480)
Chore & Maintenance
-
[docs]
Update link to Jest 28 upgrade guide in error message (#13483) -
[jest-runner, jest-watcher]
Updateemittery
(#13490)
v29.2.1
Features
-
[@jest/globals, jest-mock]
Addjest.Spied*
utility types (#13440)
Fixes
-
[jest-environment-node]
makeglobalThis.performance
writable for Node 19 and fake timers (#13467) -
[jest-mock]
Revert #13398 to restore mocking of setters (#13472)
Performance
-
[*]
Use sha1 instead of sha256 for hashing (#13421)
v29.2.0
Features
-
[@jest/cli, jest-config]
A seed for the test run will be randomly generated, or set by a CLI option (#13400) -
[@jest/cli, jest-config]
--show-seed
will display the seed value in the report, and can be set via a CLI flag or through the config file (#13400) -
[jest-config]
AddreadInitialConfig
utility function (#13356) -
[jest-core]
AllowtestResultsProcessor
to be async (#13343) -
[@jest/environment, jest-environment-node, jest-environment-jsdom, jest-runtime]
AddgetSeed()
to thejest
object (#13400) -
[expect, @​jest/expect-utils]
AllowisA
utility to take a type argument (#13355) -
[expect]
ExposeAsyncExpectationResult
andSyncExpectationResult
types (#13411)
Fixes
-
[babel-plugin-jest-hoist]
IgnoreTSTypeQuery
when checking for hoisted references (#13367) -
[jest-core]
FixdetectOpenHandles
false positives for some special objects such asTLSWRAP
(#13414) -
[jest-mock]
Fix mocking of getters and setters on classes (#13398) -
[jest-reporters]
Revert: Transform file paths into hyperlinks (#13399) -
[@jest/types]
Infer type ofeach
table correctly when the table is a tuple or array (#13381) -
[@jest/types]
Rework typings to allow the*ReturnedWith
matchers to be called with no argument (#13385)
Chore & Maintenance
-
[*]
Update@babel/*
deps, resulting in slightly different stack traces foreach
(#13422)
Performance
-
[jest-runner]
Do not instrument v8 coverage data if coverage should not be collected (#13282)
v29.1.2
Fixes
-
[expect, @​jest/expect]
Revert buggy inference of argument types for*CalledWith
and*ReturnedWith
matchers introduced in 29.1.0 (#13339) -
[jest-worker]
Add missing dependency onjest-util
(#13341)
v29.1.1
Fixes
-
[jest-mock]
Revert #13145 which broke mocking of transpiled ES modules
v29.1.0
Features
-
[expect, @​jest/expect]
Support type inference for function parameters inCalledWith
assertions (#13268) -
[expect, @​jest/expect]
Infer type of*ReturnedWith
matchers argument (#13278) -
[@jest/environment, jest-runtime]
Allowjest.requireActual
andjest.requireMock
to take a type argument (#13253) -
[@jest/environment]
Allowjest.mock
andjest.doMock
to take a type argument (#13254) -
[@jest/fake-timers]
Addjest.now()
to return the current fake clock time (#13244, #13246) -
[@jest/mock]
AddwithImplementation
method for temporarily overriding a mock (#13281) -
[expect]
ExporttoThrow*
matchers (#13328)
Fixes
-
[jest-circus, jest-jasmine2]
Fix error messages for Node'sassert.throes
(#13322) -
[jest-haste-map]
Remove__proto__
usage (#13256) -
[jest-mock]
ImprovespyOn
typings to handle optional properties (#13247) -
[jest-mock]
Fix mocking of getters and setters on classes (#13145) -
[jest-snapshot]
Throw useful error when an array is passed as property matchers (#13263) -
[jest-snapshot]
Prioritize parser used in the project (#13323) -
[jest-transform]
Attempt to work around issues with atomic writes on Windows (#11423)
v29.0.3
Features
-
[@jest/environment, jest-runtime]
Allow passing a generic type argument tojest.createMockFromModule<T>()
method (#13202) -
[expect]
ExposeExpectationResult
type (#13240) -
[jest-snapshot]
ExposeContext
type (#13240) -
[@jest/globals]
Addjest.Mock
type helper (#13235)
Fixes
-
[jest-core]
CaptureexecError
duringTestScheduler.scheduleTests
and dispatch to reporters (#13203) -
[jest-resolve]
Make sure to resolve module paths after looking atexports
(#13242) -
[jest-resolve]
Improve error on module not found deep in therequire
stack (#8704) -
[jest-snapshot]
Fix typings of snapshot matchers (#13240)
Chore & Maintenance
-
[*]
Fix inconsistent workspace prefixes (#13217) -
[jest-haste-map]
Expose a minimal public API to TypeScript (#13023)
v29.0.2
Features
-
[jest-transform]
ExposeTransformFactory
type (#13184)
Fixes
-
[babel-plugin-jest-hoist]
Support importedjest
in mock factory (#13188) -
[jest-mock]
Align the behavior and return type ofgenerateFromMetadata
method (#13207) -
[jest-runtime]
Supportjest.resetModules()
with ESM (#13211)
v29.0.1
Fixes
-
[jest-snapshot]
PasssnapshotFormat
through when diffing snapshots (#13181)
v29.0.0
Features
-
[expect]
[BREAKING] Differentiate betweenMatcherContext
MatcherUtils
andMatcherState
types (#13141) -
[jest-circus]
Add support fortest.failing.each
(#13142) -
[jest-config]
[BREAKING] MakesnapshotFormat
default toescapeString: false
andprintBasicPrototype: false
(#13036) -
[jest-config]
[BREAKING] Remove undocumentedcollectCoverageOnlyFrom
option (#13156) -
[jest-environment-jsdom]
[BREAKING] Upgrade tojsdom@20
(#13037, #13058) -
[@jest/globals]
Addjest.Mocked
,jest.MockedClass
,jest.MockedFunction
andjest.MockedObject
utility types (#12727) -
[jest-mock]
[BREAKING] RefactorMocked*
utility types.MaybeMockedDeep
andMaybeMocked
becameMocked
andMockedShallow
respectively; only deep mocked variants ofMockedClass
,MockedFunction
andMockedObject
are exported (#13123, #13124) -
[jest-mock]
[BREAKING] Change the defaultjest.mocked
helper’s behavior to deep mocked (#13125) -
[jest-snapshot]
[BREAKING] Letbabel
find config when updating inline snapshots (#13150) -
[@jest/test-result, @​jest/types]
[BREAKING] ReplaceBytes
andMilliseconds
types withnumber
(#13155) -
[jest-worker]
AddsworkerIdleMemoryLimit
option which is used as a check for worker memory leaks >= Node 16.11.0 and recycles child workers as required (#13056, #13105, #13106, #13107) -
[pretty-format]
[BREAKING] RemoveConvertAnsi
plugin in favour ofjest-serializer-ansi-escapes
(#13040) -
[pretty-format]
Allow to opt out from sorting object keys withcompareKeys: null
(#12443)
Fixes
-
[jest-config]
Fix testing multiple projects with TypeScript config files (#13099) -
[@jest/expect-utils]
Fix deep equality of ImmutableJS Record (#13055) -
[jest-haste-map]
Increase the maximum possible file size that jest-haste-map can handle (#13094) -
[jest-runtime]
Properly support CJS re-exports from dual packages (#13170) -
[jest-snapshot]
MakeprettierPath
optional inSnapshotState
(#13149) -
[jest-snapshot]
Fix parsing error from inline snapshot files withJSX
(#12760) -
[jest-worker]
When a process runs out of memory worker exits correctly and doesn't spin indefinitely (#13054)
Chore & Maintenance
-
[*]
[BREAKING] Drop support for Node v12 and v17 (#13033) -
[docs]
Fix webpack name (#13049) -
[docs]
Explicit how to setn
for--bail
(#13128) -
[docs]
Update Enzyme URL (#13166) -
[jest-leak-detector]
Remove support forweak-napi
(#13035) -
[jest-snapshot]
[BREAKING] RequirerootDir
as argument toSnapshotState
(#13150)
v28.1.3
Features
-
[jest-leak-detector]
Use nativeFinalizationRegistry
when it exists to get rid of external C dependency (#12973)
Fixes
-
[jest-changed-files]
Fix a lock-up after repeated invocations (#12757) -
[@jest/expect-utils]
Fix deep equality of ImmutableJS OrderedSets (#12977) -
[jest-mock]
Add index signature support forspyOn
types (#13013, #13020) -
[jest-snapshot]
Fix indentation of awaited inline snapshots (#12986)
Chore & Maintenance
-
[*]
Replace internal usage ofpretty-format/ConvertAnsi
withjest-serializer-ansi-escapes
(#12935, #13004) -
[docs]
Update spyOn docs (#13000)
v28.1.2
Fixes
-
[jest-runtime]
Avoid star type import from@jest/globals
(#12949)
Chore & Maintenance
-
[docs]
Mention that jest-codemods now supports Sinon (#12898)
v28.1.1
Features
-
[jest]
ExposeConfig
type (#12848) -
[@jest/reporters]
ImproveGitHubActionsReporter
s annotation format (#12826) -
[@jest/types]
Infer argument types passed totest
anddescribe
callback functions fromeach
tables (#12885, #12905)
Fixes
-
[@jest/expect-utils]
Fix deep equality of ImmutableJS OrderedMaps (#12899) -
[jest-docblock]
Handle multiline comments in parseWithComments (#12845) -
[jest-mock]
ImprovespyOn
error messages (#12901) -
[jest-runtime]
Correctly report V8 coverage withresetModules: true
(#12912) -
[jest-worker]
MakeJestWorkerFarm
helper type to include methods of worker module that take more than one argument (#12839)
Chore & Maintenance
-
[docs]
Updated docs to indicate thatjest-environment-jsdom
is a separate package #12828 -
[docs]
Document the comments used by coverage providers #12835 -
[docs]
Usedocusaurus-remark-plugin-tab-blocks
to format tabs with code examples (#12859) -
[jest-haste-map]
Bumpwalker
version (#12324)
v28.1.0
Features
-
[jest-circus]
Addfailing
test modifier that inverts the behavior of tests (#12610) -
[jest-environment-node, jest-environment-jsdom]
Allow specifyingcustomExportConditions
(#12774)
Fixes
-
[expect]
Adjust typings oflastCalledWith
,nthCalledWith
,toBeCalledWith
matchers to allow a case there a mock was called with no arguments (#12807) -
[@jest/expect-utils]
Fix deep equality of ImmutableJS Lists (#12763) -
[jest-core]
Do not collectSIGNREQUEST
as open handles (#12789)
Chore & Maintenance
-
[docs]
Specified documentation about--filter
CLI docs (#12799) -
[@jest-reporters]
Move helper functions fromutils.ts
into separate files (#12782) -
[jest-resolve]
Replaceprocess.versions.pnp
type declaration with@types/pnpapi
devDependency (#12783)
v28.0.3
Fixes
-
[jest-config]
Normalizereporters
option defined in presets (#12769) -
[@jest/reporters]
Fix trailing slash in matchingcoverageThreshold
key (#12714) -
[jest-resolve]
Fix (experimental) ESM module mocking for re-exports (#12766) -
[@jest/transform]
Throw better error if an invalid return value if encountered (#12764)
Chore & Maintenance
-
[docs]
Fix typo in--shard
CLI docs (#12761)
v28.0.2
Features
-
[jest-worker]
AddJestWorkerFarm
helper type (#12753)
Fixes
-
[*]
Lower Node 16 requirement to 16.10 from 16.13 due to a Node bug that causes memory and performance issues (#12754)
v28.0.1
Features
-
[jest-resolve]
ExposeResolverOptions
type (#12736)
Fixes
-
[expect]
Add missing dependencyjest-util
(#12744) -
[jest-circus]
Improvetest.concurrent
(#12748) -
[jest-resolve]
Correctly throw an error ifjsdom
test environment is used, but not installed (#12749)
Chore & Maintenance
-
[jest-serializer]
Remove deprecated module from source tree (#12735)
v28.0.0
Features
-
[babel-jest]
ExportcreateTransformer
function (#12399) -
[expect]
ExposeAsymmetricMatchers
,MatcherFunction
andMatcherFunctionWithState
interfaces (#12363, #12376) -
[jest-circus]
Support error logging before retry (#12201) -
[jest-circus, jest-jasmine2]
Allowed classes and functions asdescribe
andit
/test
names (#12484) -
[jest-cli, jest-config]
[BREAKING] RemovetestURL
config, usetestEnvironmentOptions.url
instead (#10797) -
[jest-cli, jest-core]
Add--shard
parameter for distributed parallel test execution (#12546) -
[jest-cli]
[BREAKING] Remove undocumented--timers
option (#12572) -
[jest-config]
[BREAKING] Stop shippingjest-environment-jsdom
by default (#12354) -
[jest-config]
[BREAKING] Stop shippingjest-jasmine2
by default (#12355) -
[jest-config, @​jest/types]
Addci
toGlobalConfig
(#12378) -
[jest-config]
[BREAKING] RenamemoduleLoader
toruntime
(#10817) -
[jest-config]
[BREAKING] RenameextraGlobals
tosandboxInjectedGlobals
(#10817) -
[jest-config]
[BREAKING] Throw an error instead of showing a warning if multiple configs are used (#12510) -
[jest-config]
[BREAKING] Do not normalize long deprecated configuration optionspreprocessorIgnorePatterns
,scriptPreprocessor
,setupTestFrameworkScriptFile
andtestPathDirs
(#12701) -
[jest-cli, jest-core]
Add--ignoreProjects
CLI argument to ignore test suites by project name (#12620) -
[jest-core]
Pass project config toglobalSetup
/globalTeardown
function as second argument (#12440) -
[jest-core]
Stabilize test runners with event emitters (#12641) -
[jest-core, jest-watcher]
[BREAKING] MoveTestWatcher
class tojest-watcher
package (#12652) -
[jest-core]
Allow using Summary Reporter as stand-alone reporter (#12687) -
[jest-environment-jsdom]
[BREAKING] Upgrade jsdom to 19.0.0 (#12290) -
[jest-environment-jsdom]
[BREAKING] Add defaultbrowser
condition toexportConditions
forjsdom
environment (#11924) -
[jest-environment-jsdom]
[BREAKING] Pass global config to Jest environment constructor forjsdom
environment (#12461) -
[jest-environment-jsdom]
[BREAKING] Second argumentcontext
to constructor is mandatory (#12469) -
[jest-environment-node]
[BREAKING] Add defaultnode
andnode-addon
conditions toexportConditions
fornode
environment (#11924) -
[jest-environment-node]
[BREAKING] Pass global config to Jest environment constructor fornode
environment (#12461) -
[jest-environment-node]
[BREAKING] Second argumentcontext
to constructor is mandatory (#12469) -
[jest-environment-node]
Add all available globals to test globals, not just explicit ones (#12642, #12696) -
[@jest/expect]
New module which extendsexpect
withjest-snapshot
matchers (#12404, #12410, #12418) -
[@jest/expect-utils]
New module exporting utils forexpect
(#12323) -
[@jest/fake-timers]
[BREAKING] Renametimers
configuration option tofakeTimers
(#12572) -
[@jest/fake-timers]
[BREAKING] Allowjest.useFakeTimers()
andprojectConfig.fakeTimers
to take an options bag (#12572) -
[jest-haste-map]
[BREAKING]HasteMap.create
now returns a promise (#12008) -
[jest-haste-map]
Add support fordependencyExtractor
written in ESM (#12008) -
[jest-mock]
[BREAKING] Rename exported utility typesClassLike
,FunctionLike
,ConstructorLikeKeys
,MethodLikeKeys
,PropertyLikeKeys
; remove exports of utility typesArgumentsOf
,ArgsType
,ConstructorArgumentsOf
- TS builtin utility typesConstructorParameters
andParameters
should be used instead (#12435, #12489) -
[jest-mock]
ImproveisMockFunction
to infer types of passed function (#12442) -
[jest-mock]
[BREAKING] Improve the usage ofjest.fn
generic type argument (#12489) -
[jest-mock]
Add support for auto-mocking async generator functions (#11080) -
[jest-mock]
Addcontexts
member to mock functions (#12601) -
[@jest/reporters]
Add GitHub Actions reporter (#11320, #12658) -
[@jest/reporters]
PassreporterContext
to custom reporter constructors as third argument (#12657) -
[jest-resolve]
[BREAKING] Add support forpackage.json
exports
(#11961, #12373) -
[jest-resolve]
Support package self-reference (#12682) -
[jest-resolve, jest-runtime]
Add support fordata:
URI import and mock (#12392) -
[jest-resolve, jest-runtime]
Add support for async resolver (#11540) -
[jest-resolve]
[BREAKING] Removebrowser?: boolean
from resolver options,conditions: ['browser']
should be used instead (#12707) -
[jest-resolve]
ExposeJestResolver
,AsyncResolver
,SyncResolver
,PackageFilter
,PathFilter
andPackageJSON
types (#12707, (#12712) -
[jest-runner]
AllowsetupFiles
module to export an async function (#12042) -
[jest-runner]
Allow passingtestEnvironmentOptions
via docblocks (#12470) -
[jest-runner]
ExposeCallbackTestRunner
,EmittingTestRunner
abstract classes andCallbackTestRunnerInterface
,EmittingTestRunnerInterface
to help typing third party runners (#12646, #12715) -
[jest-runner]
Lock version ofsource-map-support
to 0.5.13 (#12720) -
[jest-runtime]
[BREAKING]Runtime.createHasteMap
now returns a promise (#12008) -
[jest-runtime]
Callingjest.resetModules
function will clear FS and transform cache (#12531) -
[jest-runtime]
[BREAKING] RemoveContext
type export, it must be imported from@jest/test-result
(#12685) -
[jest-runtime]
Addimport.meta.jest
(#12698) -
[@jest/schemas]
New module for JSON schemas for Jest's config (#12384) -
[@jest/source-map]
Migrate fromsource-map
to@jridgewell/trace-mapping
(#12692) -
[jest-transform]
[BREAKING] Make it required forprocess()
andprocessAsync()
methods to always return structured data (#12638) -
[jest-test-result]
Add duration property to JSON test output (#12518) -
[jest-watcher]
[BREAKING] MakePatternPrompt
class to takeentityName
as third constructor parameter instead ofthis._entityName
(#12591) -
[jest-worker]
[BREAKING] Allow only absoluteworkerPath
(#12343) -
[jest-worker]
[BREAKING] Default to advanced serialization when using child process workers (#10983) -
[pretty-format]
NewmaxWidth
parameter (#12402)
Fixes
-
[*]
Usesha256
instead ofmd5
as hashing algortihm for compatibility with FIPS systems (#12722) -
[babel-jest]
[BREAKING] PassrootDir
asroot
in Babel's options (#12689) -
[expect]
Move typings of.not
,.rejects
and.resolves
modifiers outside ofMatchers
interface (#12346) -
[expect]
Throw useful error ifexpect.extend
is called with invalid matchers (#12488) -
[expect]
FixiterableEquality
ignores other properties (#8359) -
[expect]
Fix print for thecloseTo
matcher (#12626) -
[jest-changed-files]
ImprovechangedFilesWithAncestor
pattern for Mercurial SCM (#12322) -
[jest-circus, @​jest/types]
Disallow undefined value inTestContext
type (#12507) -
[jest-config]
Correctly detect CI environment and update snapshots accordingly (#12378) -
[jest-config]
PassmoduleTypes
tots-node
to enforce CJS when transpiling (#12397) -
[jest-config]
[BREAKING] Addmjs
andcjs
to defaultmoduleFileExtensions
config (#12578) -
[jest-config, jest-haste-map]
Allow searching for tests innode_modules
by exposingretainAllFiles
(#11084) -
[jest-core]
[BREAKING] Exit with status1
if no tests are found with--findRelatedTests
flag (#12487) -
[jest-core]
Do not report unref-ed subprocesses as open handles (#12705) -
[jest-each]
%#
is not replaced with index of the test case (#12517) -
[jest-each]
Fixes error message with incorrect count of missing arguments (#12464) -
[jest-environment-jsdom]
Makejsdom
accessible to extending environments again (#12232) -
[jest-environment-jsdom]
Log JSDOM errors more cleanly (#12386) -
[jest-environment-node]
AddMessageChannel
,MessageEvent
to globals (#12553) -
[jest-environment-node]
AddstructuredClone
to globals (#12631) -
[@jest/expect-utils]
[BREAKING] Fix false positives when looking forundefined
prop (#8923) -
[jest-haste-map]
Don't use partial results if file crawl errors (#12420) -
[jest-haste-map]
Make watchman existence check lazy+async (#12675) -
[jest-jasmine2, jest-types]
[BREAKING] Move alljasmine
specific types from@jest/types
to its own package (#12125) -
[jest-jasmine2]
Do not setduration
to0
for skipped tests (#12518) -
[jest-matcher-utils]
Pass maxWidth topretty-format
to avoid printing every element in arrays by default (#12402) -
[jest-mock]
Fix function overloads forspyOn
to allow more correct type inference in complex object (#12442) -
[jest-mock]
Handle overriddenFunction.name
property (#12674) -
[@jest/reporters]
Notifications generated by the--notify
flag are no longer persistent in GNOME Shell. (#11733) -
[@jest/reporters]
Move missing icon file which is needed forNotifyReporter
class. (#12593) -
[@jest/reporters]
Updatev8-to-istanbul
(#12697) -
[jest-resolver]
Call custom resolver with core node.js modules (#12654) -
[jest-runner]
Correctly resolvesource-map-support
(#12706) -
[jest-worker]
FixFarm
execution results memory leak (#12497)
Chore & Maintenance
-
[*]
[BREAKING] Drop support for Node v10 and v15 and target first LTS16.13.0
(#12220) -
[*]
[BREAKING] Drop support fortypescript@3.8
, minimum version is now4.3
(#11142, #12648) -
[*]
Bundle all.d.ts
files into a singleindex.d.ts
per module (#12345) -
[*]
UseglobalThis
instead ofglobal
(#12447) -
[babel-jest]
[BREAKING] Only exportcreateTransformer
(#12407) -
[docs]
Add note about not mixingdone()
with Promises (#11077) -
[docs, examples]
Update React examples to match with the new React guidelines for code examples (#12217) -
[docs]
Add clarity for module factory hoisting limitations (#12453) -
[docs]
Add more information about how code transformers work (#12407) -
[docs]
Add upgrading guide (#12633) -
[expect]
[BREAKING] Remove support for importingbuild/utils
(#12323) -
[expect]
[BREAKING] Migrate to ESM (#12344) -
[expect]
[BREAKING] Snapshot matcher types are moved to@jest/expect
(#12404) -
[jest-cli]
Updateyargs
to v17 (#12357) -
[jest-config]
[BREAKING] RemovegetTestEnvironment
export (#12353) -
[jest-config]
[BREAKING] Rename config optionname
toid
(#11981) -
[jest-create-cache-key-function]
Added README.md file with basic usage instructions (#12492) -
[@jest/core]
Useindex.ts
instead ofjest.ts
as main export (#12329) -
[jest-environment-jsdom]
[BREAKING] Migrate to ESM (#12340) -
[jest-environment-node]
[BREAKING] Migrate to ESM (#12340) -
[jest-haste-map]
Remove legacyisRegExpSupported
(#12676) -
[@jest/fake-timers]
Update@sinonjs/fake_timers
to v9 (#12357) -
[jest-jasmine2, jest-runtime]
[BREAKING] UseSymbol
to passjest.setTimeout
value instead ofjasmine
specific logic (#12124) -
[jest-phabricator]
[BREAKING] Migrate to ESM (#12341) -
[jest-resolve]
[BREAKING] MakerequireResolveFunction
argument mandatory (#12353) -
[jest-runner]
[BREAKING] Remove some type exports from@jest/test-result
(#12353) -
[jest-runner]
[BREAKING] Second argument to constructor (Context
) is not optional (#12640) -
[jest-serializer]
[BREAKING] Deprecate package in favour of usingv8
APIs directly (#12391) -
[jest-snapshot]
[BREAKING] Migrate to ESM (#12342) -
[jest-transform]
Updatewrite-file-atomic
to v4 (#12357) -
[jest-types]
[BREAKING] RemoveConfig.Glob
andConfig.Path
(#12406) -
[jest]
Useindex.ts
instead ofjest.ts
as main export (#12329)
Performance
-
[jest-haste-map]
[BREAKING] Default tonode
crawler over shelling out tofind
ifwatchman
is not enabled (#12320)
v27.5.1
Features
-
[jest-config]
Support comments in JSON config file (#12316) -
[pretty-format]
ExposeConvertAnsi
plugin (#12308)
Fixes
-
[expect]
Add type definitions for asymmetriccloseTo
matcher (#12304) -
[jest-cli]
Load binary via exported API (#12315) -
[jest-config]
Replacejsonlint
withparse-json
(#12316) -
[jest-repl]
Make module importable (#12311 & #12315)
Chore & Maintenance
-
[*]
Avoid anonymous default exports (#12313)
v27.5.0
Features
-
[expect]
Add asymmetric matcherexpect.closeTo
(#12243) -
[jest-mock]
AddedmockFn.mock.lastCall
to retrieve last argument (#12285)
Fixes
-
[expect]
Add a fix for.toHaveProperty('')
(#12251) -
[jest-each, @​jest/globals]
Allow passingReadonlyArray
type of a table todescribe.each
andtest.each
(#12297) -
[@jest/globals]
Add missingoptions
argument tojest.doMock
typing (#12292) -
[jest-environment-node]
Addatob
andbtoa
(#12269) -
[jest-matcher-utils]
Correct diff for expected asymmetric matchers (#12264) -
[jest-message-util]
Fix.getTopFrame()
(andtoMatchInlineSnapshot()
) withmjs
files (#12277)
Chore & Maintenance
-
[*]
Updategraceful-fs
to^4.2.9
(#11749)
Performance
-
[jest-resolve]
perf: skip error creation on not foundstat
calls (#11749)
v27.4.7
Fixes
-
jest-config
Add missing@babel/core
dependency (#12216)
v27.4.6
Fixes
-
[jest-environment-node]
AddAbortSignal
(#12157) -
[jest-environment-node]
Add Missing node globalperformance
(#12002) -
[jest-runtime]
Handle missingmocked
property (#12213) -
[@jest/transform]
Update dependency packagepirates
to 4.0.4 (#12002)
Performance
-
jest-config
perf: only register ts-node once when loading TS config files (#12160)
v27.4.5
Fixes
-
[jest-worker]
Stop explicitly passingprocess.env
(#12141)
v27.4.4
Fixes
-
[babel-jest]
Addprocess.version
chunk to the cache key (#12122) -
[jest-environment]
Addmocked
tojest
object (#12133) -
[jest-worker]
Stop explicitly passingexecArgv
(#12128)
Chore & Maintenance
-
[website]
Fix the card front that looks overlapping part of the card back
v27.4.3
Fixes
-
[jest-environment-jsdom]
Remove@types/jsdom
dependency (and make itsdom
propertyprivate
) (#12107)
v27.4.2
Fixes
-
[jest-worker]
Add additionalexecArgv
to filter (#12103)
v27.4.1
Fixes
-
[jest-worker]
FilterexecArgv
correctly (#12097)
v27.4.0
Features
-
[expect]
Enhancing thetoHaveProperty
matcher to support array selection (#12092) -
[jest-core]
Add support fortestResultsProcessor
written in ESM (#12006) -
[jest-diff, pretty-format]
AddcompareKeys
option for custom sorting of object keys (#11992) -
[jest-mock]
Addts-jest
mock util functions (#12089)
Fixes
-
[expect]
Allow againexpect.Matchers
generic with single value (#11986) -
[jest-circus, jest-jasmine2]
Avoid false concurrent test failures due to unhandled promise rejections (#11987) -
[jest-config]
Add missingslash
dependency topackage.json
(#12080) -
[jest-core]
Incorrect detection of open ZLIB handles (#12022) -
[jest-diff]
Break dependency cycle (#10818) -
[jest-environment-jsdom]
Add@types/jsdom
dependency (#11999) -
[jest-environment-jsdom]
Do not reset the global.document too early on teardown (#11871) -
[jest-transform]
Improve error and warning messages (#11998) -
[jest-worker]
PassexecArgv
correctly toworker_threads
worker (#12069)
Chore & Maintenance
-
[docs]
CLI options alphabetized (#11586) -
[jest-runner]
Add info regarding timers to forcedExit message(#12083) -
[*]
Replacedsubstr
method withsubstring
(#12066) -
[*]
Addtypes
entry to all export maps (#12073)
v27.3.1
Fixes
-
[expect]
Makeexpect
extension propertiesconfigurable
(#11978) -
[expect]
Fix.any()
checks on primitive wrapper classes (#11976)
Chore & Maintenance
-
[expect]
BigInt
global is always defined, don't check for its existence at runtime (#11979) -
[jest-config, jest-util]
Useci-info
instead ofis-ci
to detect CI environment (#11973)
v27.3.0
Features
-
[jest-config]
AddtestEnvironmentOptions.html
to apply to jsdom input (#11950) -
[jest-resolver]
Support default export (.
) inexports
field ifmain
is missing (#11919)
Fixes
-
[expect]
Tweak and improve types (#11949) -
[jest-runtime]
Ensure absolute paths can be resolved within test modules (#11943) -
[jest-runtime]
Fixinstanceof
forModernFakeTimers
andLegacyFakeTimers
methods (#11946)
v27.2.5
Features
-
[jest-config]
Warn when multiple Jest configs are located (#11922)
Fixes
-
[expect]
Pass matcher context to asymmetric matchers (#11926 & #11930) -
[expect]
Improve TypeScript types (#11931) -
[expect]
Improve typings oftoThrow()
andtoThrowError()
matchers (#11929) -
[jest-cli]
Improve--help
printout by removing defunct--browser
option (#11914) -
[jest-haste-map]
Use distinct cache paths for different values ofcomputeDependencies
(#11916) -
[@jest/reporters]
Do not bufferconsole.log
s when using verbose reporter (#11054)
Chore & Maintenance
-
[expect]
Export default matchers (#11932) -
[@jest/types]
Mark deprecated configuration options as@deprecated
(#11913)
v27.2.4
Features
-
[expect]
Add equality checks for Array Buffers inexpect.ToStrictEqual()
(#11805)
Fixes
-
[jest-snapshot]
Correctly indent inline snapshots (#11560)
v27.2.3
Features
-
[@jest/fake-timers]
Update@sinonjs/fake-timers
to v8 (#11879)
Fixes
-
[jest-config]
ParsetestEnvironmentOptions
if received from CLI (#11902) -
[jest-reporters]
Calldestroy
onv8-to-istanbul
converters to free memory (#11896)
v27.2.2
Fixes
-
[jest-runtime]
CorrectwrapperLength
value for ESM modules. (#11893)
v27.2.1
Features
-
[jest-transform]
Improve the unexpected token error message. (#11807)
Fixes
-
[jest-runtime]
Fix regression when usingjest.isolateModules
and mocks (#11882) -
[jest-runtime]
Include test name when importing modules after test has completed (#11885) -
[jest-runtime]
Error when ESM import is used after test is torn down (#11885)
v27.2.0
Features
-
[jest-resolver, jest-runtime]
Passconditions
to custom resolvers to enable them to implement support for package.jsonexports
field (#11859) -
[jest-runtime]
Allow custom envs to specifyexportConditions
which is passed together with Jest's own conditions to custom resolvers (#11863)
Fixes
-
[@jest/reporters]
Use async transform if available to transform files with no coverage (#11852) -
[jest-util]
Return correct value fromprocess.send
stub (#11799)
v27.1.1
Features
-
[jest-runtime]
Add experimental, limited (and undocumented) support for mocking ECMAScript Modules (#11818)
Fixes
-
[jest-resolver]
Supportnode:
prefix when importing Node core modules with ESM (#11817) -
[jest-types]
Export thePrettyFormatOptions
interface (#11801)
v27.1.0
Features
-
[jest-haste-map]
Use watchman suffix-set option for faster file indexing. (#11784) -
[jest-cli]
Adds a new config optionssnapshotFormat
which offers a way to override any of the formatting settings which come with pretty-format. (#11654) -
[jest-reporters]
Expose thegetSummary
util (#11695). -
[jest-resolver]
Supportnode:
prefix when importing Node core modules (#11331)
Fixes
-
[jest-each]
Relaxed the validation to allow multibyte characters in headings (#11575) -
[jest-environment-jsdom]
Add support foruserAgent
option (#11773) -
[jest-environment-node]
AddEvent
andEventTarget
to node global environment. (#11727) -
[jest-mock]
FixspyOn
to useObject.prototype.hasOwnProperty
(#11721) -
[jest-resolver]
Add dependency onjest-haste-map
(#11759) -
[jest-types]
Compat with@types/node
v16 (#11645)
Chore & Maintenance
-
[docs]
Correctexpects.assertions
documentation by adding async/await for asynchronous function.
v27.0.6
Fixes
-
[*]
Publish all modules to include the build change in (#11569)
v27.0.5
Features
-
[@jest/fake-timers]
Flush callbacks scheduled withrequestAnimationFrame
every 16ms when using legacy timers. (#11567) -
[pretty-format]
UseglobalThis
(with polyfill if required) to bring support for esbuild's browser bundling mode (#11569)
Fixes
-
[jest-core]
Support special characters like@
,+
and()
on Windows with--findRelatedTests
(#11548) -
[@jest/fake-timers]
Do not addsetImmediate
andclearImmediate
if they do not exist in the global environment (#11599) -
[@jest/reporters]
Allownode-notifier@10
as peer dependency (#11523) -
[@jest/reporters]
Updatev8-to-istanbul
(#11523)
v27.0.4
Fixes
-
[jest-config, jest-resolve]
Pass inrequire.resolve
to resolvers to resolve from correct base (#11493)
v27.0.3
Fixes
-
[jest-config]
require.resolve
on default test sequencer and test environment (#11482) -
[jest-mock]
Fixedfn
andspyOn
exports (#11480)
v27.0.2
Features
-
[jest-circus]
Add some APIs to make it easier to build your own test runner -
[jest-reporters]
Expose thegetResultHeader
util (#11460) -
[jest-resolver]
Exportresolve*
utils for different Jest modules (#11466) -
[@jest/test-result]
ExportTest
,TestEvents
andTestFileEvent
(#11466)
Fixes
-
[jest-circus]
Add missingslash
dependency (#11465) -
[jest-circus, @​jest/test-sequencer]
Remove dependency onjest-runner
(#11466) -
[jest-config]
Resolveconfig.runner
to absolute path (#11465) -
[jest-config]
Make sure to support functions as config (#11475) -
[jest-core]
Do not warn aboutDNSCHANNEL
handles when using the--detectOpenHandles
option (#11470) -
[jest-runner]
Remove dependency onjest-config
(#11466) -
[jest-worker]
Loosen engine requirement to>= 10.13.0
(#11451)
v27.0.1
Fixes
-
[jest-environment-jsdom]
Bump version of JSDOM to avoid deprecatedrequest
package (#11442)
v27.0.0
Features
-
[babel-jest]
Add async transformation (#11192) -
[jest-changed-files]
Use '--' to separate paths from revisions (#11160) -
[jest-circus]
[BREAKING] Fail tests when multipledone()
calls are made (#10624) -
[jest-circus, jest-jasmine2]
[BREAKING] Fail the test instead of just warning when describe returns a value (#10947) -
[jest-config]
[BREAKING] Default to Node testing environment instead of browser (JSDOM) (#9874) -
[jest-config]
[BREAKING] Usejest-circus
as default test runner (#10686) -
[jest-config]
Add support forpreset
written in ESM (#11200) -
[jest-config, jest-runtime]
Support ESM for files other than.js
and.mjs
(#10823) -
[jest-config, jest-runtime]
[BREAKING] Use "modern" implementation as default for fake timers (#10874 & #11197) -
[jest-config
Allow passingforceNodeFilesystemAPI
through tojest-haste-map
(#11264) -
[jest-config, jest-haste-map, jest-resolve, jest-runner, jest-runtime, jest-test-sequencer, jest-transform, jest-types]
[BREAKING] Add custom HasteMap class implementation config option (#11107) -
[jest-core]
makeTestWatcher
extendemittery
(#10324) -
[jest-core]
Run failed tests interactively the same way we do with snapshots (#10858) -
[jest-core]
moreTestSequencer
methods can be async (#10980) -
[jest-core]
Add support fortestSequencer
written in ESM (#11207) -
[jest-core]
Add support forglobalSetup
andglobalTeardown
written in ESM (#11267) -
[jest-core]
Add support forwatchPlugins
written in ESM (#11315) -
[jest-core]
Add support forrunner
written in ESM (#11232) -
[jest-core]
Add support forreporters
written in ESM (#11427) -
[jest-each]
Add support for interpolation with object properties (#11388) -
[jest-environment-node]
Add AbortController to globals (#11182) -
[@jest/fake-timers]
Update to@sinonjs/fake-timers
to v7 (#11198) -
[jest-haste-map]
Handle injected scm clocks (#10966) -
[jest-haste-map]
AddenableSymlinks
configuration option to follow symlinks for test files (#9351) -
[jest-repl, jest-runner]
[BREAKING] Run transforms over environment (#8751) -
[jest-repl]
Add support fortestEnvironment
written in ESM (#11232) -
[jest-reporters]
Add static filepath property to all reporters (#11015) -
[jest-runner]
[BREAKING] set exit code to 1 if test logs after teardown (#10728) -
[jest-runner]
[BREAKING] Run transforms overrunner
(#8823) -
[jest-runner]
[BREAKING] Run transforms overtestRunner
(#8823) -
[jest-runner]
Possibility to use ESM for test environment (11033) -
[jest-runner]
Add support fortestRunner
written in ESM (#11232) -
[jest-runtime]
Detect reexports from CJS as named exports in ESM (#10988) -
[jest-runtime]
Support for async code transformations (#11191 & #11220) -
[jest-snapshot]
[BREAKING] Make prettier optional for inline snapshots - fall back to string replacement (#7792 & #11192) -
[jest-snapshot]
[BREAKING] Run transforms oversnapshotResolver
(#8829) -
[jest-transform]
Pass config options defined in Jest's config to transformer'sprocess
andgetCacheKey
functions (#10926) -
[jest-transform]
Add support for transformers written in ESM (#11163) -
[jest-transform]
[BREAKING] Do not exportScriptTransformer
class, instead export the async functioncreateScriptTransformer
(#11163) -
[jest-transform]
Async code transformations (#9889) -
[jest-transform]
Support transpiled transformers (#11193) -
[jest-transform]
[BREAKING]requireAndTranspileModule
always return aPromise
, and the third parameter type is changed toRequireAndTranspileModuleOptions
which acceptapplyInteropRequireDefault
option (#11232) -
[jest-transform]
[BREAKING]createTranspilingRequire
return function which return aPromise
now (#11232) -
[jest-util]
add requireOrImportModule for importing CJS or ESM (#11199) -
[jest-util]
addapplyInteropRequireDefault
option onrequireOrImportModule
(#11232) -
[jest-watcher]
Added support for clearing the line when<C-u>
is pressed in a watch mode pattern prompt (#11358) -
[jest-worker]
Add support for custom task queues and adds aPriorityQueue
implementation. (#10921) -
[jest-worker]
Add in-order scheduling policy to jest worker (10902) -
[pretty-format]
Better print for sparse arrays (11326) -
[pretty-print]
Add optionprintBasicPrototype
which determines whether or not the prototype should be printed for raw objects or arrays (#11441)
Fixes
-
[babel-plugin-jest-hoist]
Add__dirname
and__filename
to whitelisted globals (#10903) -
[expect]
[BREAKING] Reviseexpect.not.objectContaining()
to be the inverse ofexpect.objectContaining()
, as documented. (#10708) -
[expect]
[BREAKING] MaketoContain
more strict with the received type (#10119 & #10929) -
[expect]
[BREAKING]matcherResult
onJestAssertionError
are now strings rather than functions (#10989) -
[jest-circus]
Fixed the issue of beforeAll & afterAll hooks getting executed even if it is inside a skippeddescribe
block (#10806) -
[jest-circus]
FixtestLocation
on Windows when usingtest.each
(#10871) -
[jest-cli]
Use testFailureExitCode when bailing from a failed test (#10958) -
[jest-cli]
Print custom error if error thrown from global hooks is not an error already (#11003) -
[jest-cli]
Allow running multiple "projects" from programmatic API (#11307) -
[jest-cli]
Fix missing collectCoverage after init (#11353) -
[jest-cli, jest-config, jest-types]
Move all default values intojest-config
(#9924) -
[jest-config]
[BREAKING] Change default file extension order by moving json behind ts and tsx (10572) -
[jest-console]
console.dir
now respects the second argument correctly (#10638) -
[jest-core]
Don't report PerformanceObserver as open handle (#11123) -
[jest-core]
UseWeakRef
to hold timers when detecting open handles (#11277) -
[jest-core]
Correctly detect open handles that were created in test functions usingdone
callbacks (#11382) -
[jest-core]
Do not collectRANDOMBYTESREQUEST
as open handles (#11278) -
[jest-core]
Wait briefly for open handles to close before flagging them when using--detectOpenHandles
(#11429) -
[jest-diff]
[BREAKING] Use only named exports (#11371) -
[jest-each]
[BREAKING] Ignore excess words in headings (#8766) -
[jest-each]
Support array index with template strings (#10763) -
[jest-each]
Interpolate%%
correctly (#11364) -
[jest-each]
Fix wrong interpolation when the value of array contains multiple%
(#11364) -
[jest-environment]
[BREAKING] Drop support forrunScript
for test environments (#11155) -
[jest-environment-jsdom]
Use inner realm’sArrayBuffer
constructor (#10885) -
[jest-environment-jsdom]
[BREAKING] Remove Node globalssetImmediate
andclearImmediate
(#11222) -
[jest-get-type]
[BREAKING] Convert to ES Module (#11359) -
[jest-globals]
[BREAKING] Disallow return values other than aPromise
from hooks and tests (#10512) -
[jest-globals]
[BREAKING] Disallow mixing a done callback and returning aPromise
from hooks and tests (#10512) -
[jest-haste-map]
VendorNodeWatcher
fromsane
(#10919) -
[jest-jasmine2]
Fixed the issue ofbeforeAll
&afterAll
hooks getting executed even if it is inside a skippeddescribe
block when it has childtests
marked as eitheronly
ortodo
(#10806) -
[jest-jasmine2]
Fixed the issues of childtests
marked withonly
ortodo
getting executed even if it is inside a skipped parentdescribe
block (#10806) -
[jest-jasmine2]
Wrap all test functions so they open handles that were created in test functions usingdone
callbacks can be detected (#11382) -
[jest-reporter]
Handle empty files when reporting code coverage with V8 (#10819) -
[jest-resolve]
Replace read-pkg-up with escalade package (#10781) -
[jest-resolve]
Disablejest-pnp-resolver
for Yarn 2 (#10847) -
[jest-runtime]
[BREAKING] Do not injectglobal
variable into module wrapper (#10644) -
[jest-runtime]
[BREAKING] remove long-deprecatedjest.addMatchers
,jest.resetModuleRegistry
, andjest.runTimersToTime
(#9853) -
[jest-runtime]
Fix stack overflow and promise deadlock when importing mutual dependant ES module (#10892) -
[jest-runtime]
Prevent global module registry from leaking intoisolateModules
registry (#10963) -
[jest-runtime]
Refactor to prevent race condition when linking and evaluating ES Modules (#11150) -
[jest-runtime]
Throw correct error when attempting to load ESM viarequire
(#11260) -
[jest-runtime]
Do not cache modules that throw during evaluation (#11263) -
[jest-transform]
Show enhancedSyntaxError
message for allSyntaxError
s (#10749) -
[jest-transform]
[BREAKING] Refactor API to pass an options bag around rather than multiple boolean options (#10753) -
[jest-transform]
[BREAKING] Refactor API of transformers to pass an options bag rather than separateconfig
and other options (#10834) -
[jest-types]
FixConfig.ts
projects
types (#11285) -
[jest-util]
Replace micromatch with picomatch to fix issues with negated globs (#11287) -
[jest-validate]
Useen-US
locale to avoid case conversion problems while validating CLI options on machines with some certain locales(e.g. Turkish) set as default locale. (#11412) -
[jest-worker]
[BREAKING] Use named exports (#10623) -
[jest-worker]
Do not swallow errors during serialization (#10984) -
[jest-worker]
HandleERR_IPC_CHANNEL_CLOSED
errors properly (#11143) -
[pretty-format]
[BREAKING] Convert to ES Modules (#10515) -
[pretty-format]
Only callhasAttribute
if it's a function (#11000) -
[pretty-format]
Handle jsdom attributes properly (#11189) -
[pretty-format]
Import pretty-format using named imports (#11360)
Chore & Maintenance
-
[*]
[BREAKING] Only support Node LTS releases and Node 15 (#10685) -
[*]
[BREAKING] Addexports
field to allpackage.json
s (#9921) -
[*]
Make it easier for Jest's packages to use the VM escape hatch (#10824) -
[*]
[BREAKING] Remove deprecatedmapCoverage
(#9968) -
[babel-jest]
[BREAKING] Migrate to ESM (#11193) -
[docs]
Correct example usingbrowser-resolve
(#11140) -
[docs]
Clarifytimers
configuration property (#11376) -
[jest, jest-core]
[BREAKING] ReplaceTestScheduler
export withcreateTestScheduler
(#11427) -
[jest-config]
[BREAKING] RemoveenabledTestsMap
config, usefilter
instead (#10787) -
[jest-console]
[BREAKING] Moveroot
intoconfig
and takeGlobalConfig
as mandatory parameter forgetConsoleOutput
(#10126) -
[jest-console]
Export LogEntry (#11017) -
[jest-fake-timers]
Clarify global behavior ofjest.useFakeTimers
andjest.useRealTimers
(#10867) -
[jest-haste-map]
[BREAKING] Migrate to ESM (#10875) -
[jest-haste-map]
[BREAKING] Remove support for deprecated optionignorePattern
as function (#10348) -
[jest-jasmine2]
[BREAKING] Migrate to ESM (#10906) -
[jest-jasmine2]
[BREAKING] Remove unused options argument fromEnv
constructor (#10240) -
[jest-repl, jest-runtime]
[BREAKING] Move thejest-runtime
CLI intojest-repl
(#10016 & #10925) -
[jest-resolve]
[BREAKING] Migrate to ESM (#10688) -
[jest-resolve-dependencies]
[BREAKING] Migrate to ESM (#10876) -
[jest-mock]
[BREAKING] Migrate to ESM (#10887) -
[jest-reporters]
[BREAKING] Makenode-notifier
a peer dependency (#10977) -
[jest-resolve, jest-runtime]
[BREAKING] UseMap
s instead of objects for all cached resources (#10968) -
[jest-runner]
[BREAKING] Migrate to ESM (#10900) -
[jest-runtime]
[BREAKING] Remove deprecated and unusedgetSourceMapInfo
from Runtime (#9969) -
[jest-transformer]
[BREAKING] Remove unusedisCoreModule
option (#11166) -
[jest-util]
No longer checkingenumerable
when addingprocess.domain
(#10862) -
[jest-validate]
[BREAKING] RemoverecursiveBlacklist
option in favor of previously introducedrecursiveDenylist
(#10650) -
[website]
Replace 'Github' with 'GitHub' (#11279) -
[website]
Remove a language code from the link to the Node.js website (#11282) -
[website]
Remove a duplicated word (#11281) -
[website]
Add french to website (#11361)
Performance
-
[jest-resolve]
Cache reading and parsing ofpackage.json
s (#11076) -
[jest-runtime, jest-transform]
sharecacheFS
between runtime and transformer (#10901) -
[jest-runtime]
Loadchalk
only once per worker (#10864) -
[jest-worker]
Fix memory leak of previous task arguments while no new task is scheduled (#11187)
v26.6.3
Fixes
-
[jest-resolve-dependencies]
Continue dependency resolution if mock dependency can't be found (#10779)
v26.6.2
Features
-
[jest-core]
AddfindRelatedTests
andnonFlagArgs
in allowed config options forupdateConfigAndRun
in watch plugins (#10659)
Fixes
-
[babel-plugin-jest-hoist]
Preserve order of hoisted mock nodes within containing block (#10536) -
[babel-plugin-jest-hoist]
Hoist pure constants to support experimental JSX transform in hoisted mocks (#10723) -
[babel-preset-jest]
Updatebabel-preset-current-node-syntax
to support top level await (#10747) -
[expect]
Revert "FixobjectContaining
to work recursively into sub-objects (#10508)" (#10766) -
[jest-circus, jest-jasmine2]
fix: don't assumestack
is always a string (#10697) -
[jest-config]
Fix bug introduced in watch mode by MR #10678 (#10692) -
[jest-config]
Throw correct error for missing preset modules (#10737) -
[jest-resolve-dependencies]
Resolve mocks as dependencies (#10713) -
[jest-runtime]
Handle file URLs in dynamic imports (#10744) -
[jest-runtime, babel-jest]
Pass more ESM options to@jest/transform
(#10752) -
[jest-runtime]
Properly injectextraGlobals
into the runtime (#10758) -
[jest-transform]
Link to ESM docs on syntax errors (#10748)
Chore & Maintenance
-
[docs]
Add docs for using mocks in TypeScript (#10415) -
[eslint-config-fb-strict]
Move package from this repo tofbjs
repo (#10739) -
[examples]
Update TypeScript example to show use of newer Jest types (#10399) -
[jest-cli]
chore: standardize files and folder names (#10698) -
[jest-config]
Switch ts-nodeRegister
type toService
due to deprecation (#11210)
v26.6.1
Features
-
[jest-runtime]
Support named exports from CommonJS as named ES Module imports (#10673) -
[jest-validate]
Add support forrecursiveDenylist
option as an alternative torecursiveBlacklist
(#10236)
Fixes
-
[expect]
FixobjectContaining
to work recursively into sub-objects (#10508) -
[jest-cli, jest-core, jest-config, jest-types]
Fix--onlyFailures
flag to work in non-watch mode (#10678) -
[jest-config]
Fix for thejest.config.ts
compiler to not interfere withtsconfig.json
files (#10675) -
[jest-message-util]
Update to work properly with Node 15 (#10660) -
[jest-mock]
Allow to mock methods in getters (TypeScript 3.9 export) (#10156)
v26.6.0
Features
-
[jest-cli, jest-config]
Add support for thejest.config.ts
configuration file (#10564)
Fixes
-
[jest-config]
Simplify transform RegExp (#10207) -
[jest-fake-timers]
Lazily instantiate mock timers (#10551) -
[jest-runtime]
require.main
is no longerundefined
when usingjest.resetModules
(#10626) -
[@jest/types]
Add missing values fortimers
(#10632)
Chore & Maintenance
-
[docs]
Add step for fetchingbackers.json
file in website setup docs (#10631) -
[docs]
Add page detailing environment variables set by Jest (#10630) -
[jest-circus]
RefactorcallAsyncCircusFn
parameters (#10629)
v26.5.3
Features
-
[jest-runtime]
add support for dynamicimport()
from CommonJS (#10620)
Fixes
-
[jest-runner, jest-runtime]
require.main
should not beundefined
withcreateRequire()
(#10610) -
[jest-runtime]
add missingmodule.path
property (#10615) -
[jest-runtime]
AddmainModule
instance variable to runtime (#10621) -
[jest-runtime]
Evaluate Node core modules on dynamicimport()
(#10622) -
[jest-validate]
Show suggestion only when unrecognized cli param is longer than 1 character (#10604) -
[jest-validate]
ValidatetestURL
as CLI option (#10595)
v26.5.2
Fixes
-
[*]
Revert usage of Escalade and rollback Yargs to v15 as it breaks Node 13 (#10599) -
[jest-circus]
Setup globals before emittingsetup
, and include Jest globals in thesetup
payload (#10598) -
[jest-mock]
Fix typings formockResolvedValue
,mockResolvedValueOnce
,mockRejectedValue
andmockRejectedValueOnce
(#10600)
v26.5.0
Features
-
[jest-circus, jest-config, jest-runtime]
Add newinjectGlobals
config and CLI option to disable injecting global variables into the runtime (#10484) -
[jest-each]
Fixes.each
type to always be callable (#10447) -
[jest-runner]
Add support formoduleLoader
s withdefault
exports (#10541) -
[@jest/create-cache-key-function]
Added a new package for creating cache keys (#10587)
Fixes
-
[jest-circus, jest-jasmine2]
Find correct location fortest.each
tests (#10413) -
[jest-console]
AddConsole
constructor toconsole
object (#10502) -
[jest-globals]
Fix lifecycle hook function types (#10480) -
[jest-runtime]
Remove usage ofvm.compileFunction
due to a performance issue (#10586)
Chore & Maintenance
-
[jest-resolve]
Replace read-pkg-up with escalade package (10558) -
[jest-environment-jsdom]
Update jsdom to 16.4.0 (10578)
v26.4.2
Fixes
-
[expect]
FixtoMatchObject
to work with inherited class getters (#10381) -
[pretty-format]
Lower minimum node version to >= 10 (#10435)
v26.4.1
Fixes
-
[jest-core]
Don't report ELDHistogram as open handle (#10417) -
[jest-matcher-utils]
Fix diffing object contain readonly symbol key object (#10414) -
[jest-reporters]
Fixes notify reporter on Linux (using notify-send) (#10400) -
[jest-snapshot]
Correctly handles arrays and property matchers in snapshots (#10404)
v26.4.0
Features
-
[jest-resolve]
Add support forpackageFilter
on custom resolver (#10393)
Fixes
-
[pretty-format]
HandletagName
not being a string (#10397)
v26.3.0
Features
-
[jest-circus, jest-jasmine2]
IncludefailureDetails
property in test results (#9496) -
[jest-each, jest-jasmine, jest-circus]
Add support for.concurrent.each
(#9326)
Fixes
-
[jest-config]
Add.pnp.js
totransformIgnorePatterns
defaults (#10383) -
[jest-leak-detector]
Wait properly for GC runs due to changes in Node 14.7 (#10366) -
[jest-worker]
Downgrade minimum node version to 10.13 (#10352) -
[docs]
Update snapshot testing documentation(#10359)
v26.2.2
Fixes
-
[jest-cli]
Use correct file name to override existing jest config on init (#10337) -
[jest-haste-map]
Properly detect support for nativefind
(#10346)
v26.2.1
Fixes
-
[jest-worker]
Make sure to work with Node TS typings v12 (#10336)
v26.2.0
Features
-
[jest-core, jest-circus, jest-reporter, jest-runner]
Added support for reporting individual test cases using jest-circus (#10227) -
[jest-config, jest-reporter, jest-runner, jest-test-sequencer]
AddslowTestThreshold
configuration option (#9366) -
[jest-haste-map]
Watchman crawler now includes dotfiles (#10075) -
[jest-worker]
Added support for workers to send custom messages to parent in jest-worker (#10293) -
[jest-worker]
Support passingresourceLimits
(#10335) -
[pretty-format]
Added support for serializing custom elements (web components) (#10237)
Fixes
-
[expect]
Match symbols and bigints inany()
(#10223) -
[jest-changed-files]
Usegit diff
instead ofgit log
for--changedSince
(#10155) -
[jest-console]
Add missingconsole.timeLog
for compatibility with Node (#10209) -
[jest-haste-map]
Checkfind
binary supports the-iname
parameter (#10308) -
[jest-snapshot]
Strip added indentation for inline error snapshots (#10217)
Chore & Maintenance
-
[*]
Add missing dependency on@types/node
(#10248) -
[jest-jasmine2]
ConvertPCancelable
to TypeScript (#10215) -
[jest-jasmine2]
Refine typings ofqueueRunner
(#10215) -
[jest-jasmine2]
Remove usage ofFunction
type (#10216) -
[jest-resolve]
Improve types (#10239) -
[docs]
Clarify thejest.requireActual(moduleName)
example -
[jest-types]
Refine typings ofcoverageReporters
(#10275)
v26.1.0
Features
-
[jest-mock]
ExportMock
,MockInstance
,SpyInstance
types (#10138) -
[jest-config]
Support config files exporting (async
)function
s (#10001) -
[jest-cli, jest-core]
Add--selectProjects
CLI argument to filter test suites by project name (#8612) -
[jest-cli, jest-init]
AddcoverageProvider
tojest --init
prompts (#10044)
Fixes
-
[jest-console]
getConsoleOutput
to receive global stack trace config and use it to format stack trace (#10081) -
[jest-jasmine2]
Stop adding:
after an error that has no message (#9990) -
[jest-diff]
Control no diff message color withcommonColor
in diff options (#9997) -
[jest-snapshot]
Fix TypeScript compilation (#10008)
Chore & Maintenance
-
[docs]
Correct confusing filename inenableAutomock
example (#10055) -
[jest-core]
🎉 🎉 🎉 🎉 🎉 🎉 🎉 🎉 🎉 🎉 🎉 🎉 🎉 🎉 🎉 🎉 🎉 🎉 🎉 🎉 🎉 🎉 🎉 🎉 🎉 (#10000) -
[jest-core, jest-reporters, jest-test-result, jest-types]
CleanupdisplayName
type (#10049) -
[jest-runtime]
Jest-internal sandbox escape hatch (#9907) -
[jest-fake-timers]
Updatenow
param type to supportDate
in addition tonumber
. (#10169) -
[docs]
Add param tosetSystemTime
docs and remove preceding period from it andgetRealSystemTime
(#10169) -
[jest-snapshot, jest-util]
Replacemake-dir
withfs.mkdir
(#10136) -
[docs]
Added parcel-bundler documentation inside readme.md file
Performance
-
[jest-core, jest-transform, jest-haste-map]
Improve Jest startup time and test runtime, particularly when running with coverage, by caching micromatch and avoiding recreating RegExp instances (#10131)
v26.0.1
Fixes
-
[jest-circus]
Backward compatibility for deprecatedDescribeBlock.tests
to not break e.g. Detox reporter
v26.0.0
Features
-
[jest-environment-jsdom]
[BREAKING] Upgradejsdom
to v16 (#9606) -
[@jest/fake-timers]
Add possibility to use a modern implementation of fake timers, backed by@sinonjs/fake-timers
(#7776) -
[jest-runtime]
AddcreateMockFromModule
as an alias forgenMockFromModule
(#9962)
Fixes
-
[babel-jest]
Handlenull
being passed tocreateTransformer
(#9955) -
[jest-circus, jest-console, jest-jasmine2, jest-reporters, jest-util, pretty-format]
Fix time durating formatting and consolidate time formatting code (#9765) -
[jest-circus]
[BREAKING] Fail tests if a test takes a done callback and have return values (#9129) -
[jest-circus]
[BREAKING] Throw a proper error if a test / hook is defined asynchronously (#8096) -
[jest-circus]
Throw more descriptive error if hook is defined inside test (#9957) -
[jest-circus]
[BREAKING] Align execution order of tests to matchjasmine
's top to bottom order (#9965) -
[jest-config, jest-resolve]
[BREAKING] Remove support forbrowser
field (#9943) -
[jest-haste-map]
Stop reporting files as changed when they are only accessed (#7347) -
[jest-resolve]
Show relative path from root dir formodule not found
errors (#9963) -
[jest-runtime]
Fix absolute path moduleNameMapper + jest.mock bug (#8727)
Chore & Maintenance
-
[*]
[BREAKING] TypeScript definitions requires a minimum of TypeScript v3.8 (#9823) -
[*]
[BREAKING] Drop support for Node 8 (#9423) -
[*]
Upgrade to chalk@4 (#9752) -
[*]
Remove usage ofrealpath-native
(#9952) -
[docs]
Fix example reference implementation to use Jest with Phabricator (#8662) -
[docs]
Added default compiler to tranform (#8583) -
[docs]
Updated Testing Frameworks guide with React; make it generic (#9106) -
[expect, jest-mock, pretty-format]
[BREAKING] Removebuild-es5
from package (#9945) -
[@jest/fake-timers, @​jest/environment]
[BREAKING] RenameLolexFakeTimers
toModernFakeTimers
(#9960) -
[jest-haste-map]
[BREAKING] removedprovidesModuleNodeModules
(#8535) -
[jest-runtime]
[BREAKING] Remove long-deprecatedrequire.requireActual
andrequire.requireMock
methods (#9854)
v25.5.4
Fixes
-
[jest-jasmine2]
Don't runbeforeAll
/afterAll
in skipped describe blocks (#9931)
Chore & Maintenance
-
[jest-runtime]
Do not warn when mutatingrequire.cache
(#9946)
v25.5.3
Chore & Maintenance
-
[jest-circus]
Fix memory leak when running in band (#9934)
v25.5.2
Fixes
-
[jest-globals]
Export globals as values, not types (#9925)
v25.5.1
Fixes
-
[jest-haste-map]
Add missing@types/graceful-fs
dependency (#9913) -
[jest-runner]
Correctly serializeSet
passed to worker (#9915) -
[jest-runtime]
Vary ESM cache by query (#9914)
v25.5.0
Features
-
[@jest/globals]
New package so Jest's globals can be explicitly imported (#9801) -
[jest-core]
Show coverage of sources related to tests in changed files (#9769) -
[jest-runtime]
Populaterequire.cache
(#9841)
Fixes
-
[*]
Usegraceful-fs
directly in every package instead of relying onfs
being monkey patched (#9443) -
[expect]
Prints the Symbol name into the error message with a custom asymmetric matcher (#9888) -
[jest-circus, jest-jasmine2]
Support older version ofjest-runtime
(#9903 & #9842) -
[@jest/environment]
Make sure not to reference Jest types (#9875) -
[jest-message-util]
Code frame printing should respect--noStackTrace
flag (#9866) -
[jest-runtime]
Support importing CJS from ESM usingimport
statements (#9850) -
[jest-runtime]
Support importing parallel dynamicimport
s (#9858) -
[jest-transform]
Improve source map handling when instrumenting transformed code (#9811)
Chore & Maintenance
-
[docs]
Add an example for mocking non-default export class
Performance
-
[jest-resolve]
Updateresolve
to a version using nativerealpath
, which is faster than the default JS implementation (#9872) -
[jest-resolve]
Pass custom cachedrealpath
function toresolve
(#9873) -
[jest-runtime]
Addteardown
method to clear any caches when tests complete (#9906) -
[jest-runtime]
Do not pass files required internally through transformation when loading them (#9900) -
[jest-runtime]
UseMap
s instead of object literals as cache holders (#9901)
v25.4.0
-
[expect]
Supportasync function
s intoThrow
(#9817) -
[jest-console]
Add code frame toconsole.error
andconsole.warn
(#9741) -
[jest-runtime, jest-jasmine2, jest-circus]
Experimental, limited ECMAScript Modules support (#9772 & #9842)
Fixes
-
[expect]
Restore support for passing functions totoHaveLength
matcher (#9796) -
[jest-changed-files]
--only-changed
should include staged files (#9799) -
[jest-circus]
Throw on nested test definitions (#9828) -
[jest-each]
each
will throw an error when called with too many arguments (#9818) -
[jest-runner]
Don't print warning to stdout when using--json
(#9843)
Chore & Maintenance
-
[*]
Do not generate TypeScript declaration source maps (#9822) -
[*]
Transpile code for Node 8.3, not 8.0 (#9827)
v25.3.0
Features
-
[babel-jest]
Support passingsupportsDynamicImport
andsupportsStaticESM
(#9766) -
[babel-preset-jest]
Enable all syntax plugins not enabled by default that works on current version of Node (#9774) -
[jest-circus]
Enable writing async test event handlers (#9397) -
[jest-runtime, @​jest/transformer]
Support passingsupportsDynamicImport
andsupportsStaticESM
(#9597)
Chore & Maintenance
-
[*]
Replaceany
s withunknown
s (#9626) -
[@jest/transform]
Expose typeCacheKeyOptions
forgetCacheKey
(#9762) -
[@jest/types]
Correct typetestRegex
forProjectConfig
(#9780)
v25.2.7
Fixes
-
[jest-matcher-utils]
Replace accessors with values to avoid calling setters in object descriptors when computing diffs for error reporting (#9757) -
[@jest/watcher]
Correct return type ofshouldRunTestSuite
forJestHookEmitter
(#9753)
v25.2.6
Chore & Maintenance
-
[*]
25.2.5 was published without changes from 25.2.4 - 25.2.6 includes all changes from that version.
v25.2.4
Features
-
[jest-message-util]
Check for common errors when using the wrong test environment (#8245)
Fixes
-
[jest-circus]
Fix type elision of jest-runtime imports (#9717) -
[@jest/transform]
Fix coverage reporter for uncovered files without transformers, reverting #9460 (#9724)
v25.2.3
Fixes
-
[*]
Verify all packages are properly downleveled for older versions of TypeScript (#9715)
v25.2.2
Fixes
-
[jest-environment-node]
RemovegetVmContext
from Node env on older versions of Node (#9708) -
[jest-runtime]
Return constructable class fromrequire('module')
(#9711)
v25.2.1
Fixes
-
[*]
Downlevel TypeScript definitions files for compatibility with TS<3.8 (#9705)
v25.2.0
Features
-
[jest-config]
Support ESM config files with.js
extension (#9573). -
[jest-runtime]
Overridemodule.createRequire
to return a Jest-compatiblerequire
function (#9469) -
[jest-haste-map]
[BREAKING] Removemapper
option (#9581) -
[*]
Support array of paths formoduleNameMapper
aliases (#9465) -
[jest-reporters]
Adds ability to pass options to the istanbul-reporter throughcoverageReporters
(#9572) -
[jest-runtime]
Require stack when a module cannot be resolved (#9681) -
[jest-transform]
writeCacheFile
no longer callsfsync
(#9695)
Fixes
-
[expect]
Handle readonly properties correctly (#9575) -
[jest-cli]
SetcoverageProvider
correctly when provided in config (#9562) -
[jest-cli]
Allow specifying.cjs
and.mjs
config files by--config
CLI option (#9578) -
[jest-cli]
Update yargs to fix CLI flag overriding (#9519) -
[jest-config]
TreatsetupFilesAfterEnv
likesetupFiles
when normalizing configs against presets (#9495) -
[jest-config]
Support.mjs
config files on Windows as well (#9558) -
[jest-config]
VerifyrootDir
and allroots
are directories (#9569) -
[jest-config]
Ensure pattern ofreplacePosixSep
is a string (#9546) -
[jest-haste-map]
Fix crash on unix based systems without find (#9579) -
[jest-jasmine2]
Fix--testNamePattern
matching withconcurrent
tests (#9090) -
[jest-matcher-utils]
Fix diff highlight of symbol-keyed object. (#9499) -
[@jest/reporters]
Notifications should be fire&forget rather than having a timeout (#9567) -
[jest-resolve]
Fix module identity preservation with symlinks and browser field resolution (#9511) -
[jest-resolve]
Do not confuse directories with files (#8912) -
[jest-resolve]
moduleNameMapper
should take precedence over Node core modules (#9563) -
[jest-runtime]
ResetisolateModules
if it fails (#9541) -
[jest-runtime]
Yarn PnP errors displayed to the user (#9681) -
[jest-snapshot]
Downgrade semver to v6 to support node 8 (#9451) -
[jest-snapshot]
Properly indent new snapshots in the presences of existing ones (#9523) -
[jest-transform]
Correct sourcemap behavior for transformed and instrumented code (#9460) -
[jest-transform]
Allow instrumentation of transformed files with weird file extensions (#9589) -
[@jest/types]
MakeConfigGlobals
an interface to allow for declaration merging. (#9570) -
[pretty-format]
ExportOldPlugin
type (#9491)
Chore & Maintenance
-
[docs]
Warn about unexpected behavior / bug of node-notifier when using thenotify
options. -
[docs]
Grammatical corrections to Async docs page. (#9679) -
[jest-resolver]
Useresolve
package to implement custom module resolution (#9520) -
[jest-runtime]
Move execution ofsetupFiles
tojest-runner
(#9596) -
[jest-runtime]
Update anchor link inhelpers
(#9616) -
[@jest/reporters]
Remove unused dependencies and type exports (#9462) -
[website]
Update pictures of reports when matchers fail (#9214)
Performance
-
[jest-haste-map]
Reduce number oflstat
calls in node crawler (#9514)
v25.1.0
Features
-
[babel-plugin-jest-hoist]
Show codeframe on static hoisting issues (#8865) -
[babel-plugin-jest-hoist]
AddBigInt
toALLOWED_IDENTIFIERS
(#8382) -
[babel-preset-jest]
Add@babel/plugin-syntax-bigint
(#8382) -
[expect]
AddBigInt
support totoBeGreaterThan
,toBeGreaterThanOrEqual
,toBeLessThan
andtoBeLessThanOrEqual
(#8382) -
[expect, jest-matcher-utils]
Display change counts in annotation lines (#9035) -
[expect, jest-snapshot]
Support custom inline snapshot matchers (#9278) -
[jest-config]
Throw the full error message and stack when a Jest preset is missing a dependency (#8924) -
[jest-config]
[BREAKING] Set default display name color based on runner (#8689) -
[jest-config]
Merge preset globals with project globals (#9027) -
[jest-config]
Support.cjs
config files (#9291) -
[jest-config]
[BREAKING] Support.mjs
config files (#9431) -
[jest-core]
Support reporters as default exports (#9161) -
[jest-core]
Support--findRelatedTests
paths case insensitivity on Windows (#8961) -
[jest-diff]
Add options for colors and symbols (#8841) -
[jest-diff]
[BREAKING] Export as ECMAScript module (#8873) -
[jest-diff]
AddincludeChangeCounts
and renameIndicator
options (#8881) -
[jest-diff]
AddchangeColor
andpatchColor
options (#8911) -
[jest-diff]
AddtrailingSpaceFormatter
option and replace cyan withcommonColor
(#8927) -
[jest-diff]
AddfirstOrLastEmptyLineReplacement
option and export 3diffLines
functions (#8955) -
[jest-environment]
Add optionalgetVmContext
next torunScript
(#9252 & #9428) -
[jest-environment-jsdom]
AddfakeTimersLolex
(#8925) -
[jest-environment-node]
AddfakeTimersLolex
(#8925) -
[jest-environment-node]
AddqueueMicrotask
(#9140) -
[jest-environment-node]
ImplementgetVmContext
(#9252 & #9428) -
[@jest/fake-timers]
Add Lolex as implementation of fake timers (#8897) -
[jest-get-type]
AddBigInt
support. (#8382) -
[jest-matcher-utils]
AddBigInt
support toensureNumbers
ensureActualIsNumber
,ensureExpectedIsNumber
(#8382) -
[jest-matcher-utils]
Ignore highlighting matched asymmetricMatcher in diffs (#9257) -
[jest-reporters]
Export utils for path formatting (#9162) -
[jest-reporters]
Provides global coverage thresholds as watermarks for istanbul (#9416) -
[jest-runner]
Warn if a worker had to be force exited (#8206) -
[jest-runtime]
[BREAKING] Do not exportScriptTransformer
- it can be imported from@jest/transform
instead (#9256) -
[jest-runtime]
UseJestEnvironment.getVmContext
andvm.compileFunction
if available to avoid the module wrapper (#9252 & #9428) -
[jest-snapshot]
Display change counts in annotation lines (#8982) -
[jest-snapshot]
[BREAKING] Improve report when the matcher has properties (#9104) -
[jest-snapshot]
Improve colors when snapshots are updatable (#9132) -
[jest-snapshot]
Ignore indentation for most serialized objects (#9203) -
[jest-transform]
CreatecreateTranspilingRequire
function for easy transpiling modules (#9194) -
[jest-transform]
[BREAKING] Return transformed code as a string, do not wrap invm.Script
(#9253) -
[@jest/test-result]
Create method to create emptyTestResult
(#8867) -
[jest-worker]
[BREAKING] Return a promise fromend()
, resolving with the information whether workers exited gracefully (#8206) -
[jest-reporters]
Transform file paths into hyperlinks (#8980)
Fixes
-
[expect]
DisplayexpectedDiff
more carefully intoBeCloseTo
(#8389) -
[expect]
Avoid incorrect difference for subset whentoMatchObject
fails (#9005) -
[expect]
Consider all RegExp flags for equality (#9167) -
[expect]
[BREAKING] Consider primitives different from wrappers instantiated withnew
(#9167) -
[expect]
Prevent maintaining RegExp state between multiple tests (#9289) -
[expect]
Fix subsetEquality false circular reference detection (#9322) -
[jest-config]
Use half of the available cores whenwatchAll
mode is enabled (#9117) -
[jest-config]
Fix Jest multi project runner still cannot handle exactly one project (#8894) -
[jest-console]
Add missingconsole.group
calls toNullConsole
(#9024) -
[jest-core]
Don't include unref'd timers in --detectOpenHandles results (#8941) -
[jest-core]
Limit number of workers when creating haste maps in projects (#9259) -
[jest-diff]
Do not inverse format if line consists of one change (#8903) -
[jest-diff]
Rename some new options and change their default values (#9077) -
[jest-environment-node]
FixTextEncoder.encode
not referencing same globalUint8Array
constructor (#9261) -
[jest-fake-timers]
getTimerCount
will not include cancelled immediates (#8764) -
[jest-fake-timers]
Supportutil.promisify
onsetTimeout
(#9180) -
[jest-jasmine2, jest-circus]
Improve error message format for Node's assert.fail (#9262) -
[jest-leak-detector]
[BREAKING] Useweak-napi
instead ofweak
package (#8686) -
[jest-mock]
Fix for mockReturnValue overriding mockImplementationOnce (#8398) -
[jest-reporters]
Make node-notifier an optional dependency (#8918) -
[jest-reporters]
Make all arguments to methods onBaseReporter
optional (#9159) -
[jest-resolve]
: Set MODULE_NOT_FOUND as error code when module is not resolved from paths (#8487) -
[jest-resolve-dependencies]
Handle dynamic dependencies correctly even when using module maps (#9303) -
[jest-snapshot]
Remove only the added newlines in multiline snapshots (#8859) -
[jest-snapshot]
Distinguish empty string from external snapshot not written (#8880) -
[jest-snapshot]
[BREAKING] Distinguish empty string from internal snapshot not written (#8898) -
[jest-snapshot]
[BREAKING] Removereport
method and throw matcher errors (#9049) -
[jest-snapshot]
Omit irrelevantreceived
properties when property matchers fail (#9198) -
[jest-transform]
Properly cache transformed files across tests (#8890) -
[jest-transform]
Don't fail the test suite when a generated source map is invalid (#9058) -
[jest-types]
[BREAKING] Use lessnull | undefined
in config types (#9200) -
[jest-util]
Allow querying process.domain (#9136) -
[pretty-format]
Correctly detect memoized elements (#9196) -
[pretty-format]
Fix pretty-format to respect displayName on forwardRef (#9422)
Chore & Maintenance
-
[*]
[BREAKING] Drop support for Node 6 (#8455) -
[*]
Add Node 12 to CI (#8411) -
[*]
[BREAKING] Upgrade to Micromatch v4 (#8852) -
[babel-plugin-jest-hoist]
[BREAKING] Use ESM exports (#8874) -
[docs]
Add alias and optional boolean value tocoverage
CLI Reference (#8996) -
[docs]
Fix broken link pointing to legacy JS file in "Snapshot Testing". -
[docs]
AddsetupFilesAfterEnv
andjest.setTimeout
example (#8971) -
[expect]
Test thattoStrictEqual
is equivalent to Node'sassert.deepStrictEqual
(#9167) -
[jest]
[BREAKING] Use ESM exports (#8874) -
[jest-cli]
[BREAKING] Use ESM exports (#8874) -
[jest-cli]
[BREAKING] Remove re-exports from@jest/core
(#8874) -
[jest-diff]
Remove the need to exportsplitLines0
function (#9151) -
[jest-environment-jsdom]
[BREAKING] Upgrade JSDOM from v11 to v15 (#8851) -
[jest-haste-map]
Upgrade tofsevents@2
(#9215) -
[jest-reporters]
[BREAKING] Upgrade Istanbul dependencies, which are used for code coverage (#9192) -
[jest-util]
[BREAKING] Remove deprecated exports (#8863) -
[jest-validate]
[BREAKING] Use ESM exports (#8874) -
[jest-types]
MarkInitialOptions
asPartial
(#8848) -
[jest-config]
Refactornormalize
to be more type safe (#8848)
v25.0.0
Configuration
-
If you want to rebase/retry this MR, check this box
This MR has been generated by Renovate Bot.
Edited by renovate-bot