@jest/types
Advanced tools
Changelog
29.4.3
[expect]
Update toThrow()
to be able to use error cause
s (#13606)[jest-core]
allow to use workerIdleMemoryLimit
with only 1 worker or runInBand
option (#13846)[jest-message-util]
Add support for error cause
s (#13868 & #13912)[jest-runtime]
Revert import assertions
for JSON modules as it's been relegated to Stage 2 (#13911)[@jest/expect-utils]
subsetEquality
should consider also an object's inherited string keys (#13824)[jest-mock]
Clear mock state when jest.restoreAllMocks()
is called (#13867)[jest-mock]
Prevent mockImplementationOnce
and mockReturnValueOnce
bleeding into withImplementation
(#13888)[jest-mock]
Do not restore mocks when jest.resetAllMocks()
is called (#13866)Changelog
29.4.2
[@jest/core]
Instrument significant lifecycle events with performance.mark()
(#13859)[expect, @jest/expect]
Provide type of actual
as a generic argument to Matchers
to allow better-typed extensions (#13848)[jest-circus]
Added explicit mention of test failing because done()
is not being called in error message (#13847)[jest-runtime]
Handle CJS re-exports of node core modules from ESM (#13856)[jest-transform]
Downgrade write-file-atomic
to v4 (#13853)[jest-worker]
Ignore IPC messages not intended for Jest (#13543)Changelog
29.4.0
[expect, @jest/expect-utils]
Support custom equality testers (#13654)[jest-config, jest-worker]
Use os.availableParallelism
if available to calculate number of workers to spawn (#13738)[@jest/globals, jest-mock]
Add jest.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]
Add jest.isolateModulesAsync
for scoped module initialization of asynchronous functions (#13680)[jest-runtime]
Add jest.isEnvironmentTornDown
function (#13741)[jest-test-result]
Added skipped
and focused
status to FormattedTestResult
(#13700)[jest-transform]
Support for asynchronous createTransformer
(#13762)[jest-environment-node]
Fix non-configurable globals (#13687)[@jest/expect-utils]
toMatchObject
should handle Symbol
properties (#13639)[jest-mock]
Fix mockReset
and resetAllMocks
undefined
return value(#13692)[jest-resolve]
Add global paths to require.resolve.paths
(#13633)[jest-resolve]
Correct node core module detection when using node:
specifiers (#13806)[jest-runtime]
Support WASM files that import JS resources (#13608)[jest-runtime]
Use the scriptTransformer
cache in jest-runner
(#13735)[jest-runtime]
Enforce import assertions when importing JSON in ESM (#12755 & #13805)[jest-snapshot]
Make sure to import babel
outside of the sandbox (#13694)[jest-transform]
Ensure the correct configuration is passed to preprocessors specified multiple times in the transform
option (#13770)Changelog
29.2.1
[@jest/globals, jest-mock]
Add jest.Spied*
utility types (#13440)[jest-environment-node]
make globalThis.performance
writable for Node 19 and fake timers (#13467)[jest-mock]
Revert #13398 to restore mocking of setters (#13472)[*]
Use sha1 instead of sha256 for hashing (#13421)Changelog
29.2.0
[@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]
Add readInitialConfig
utility function (#13356)[jest-core]
Allow testResultsProcessor
to be async (#13343)[@jest/environment, jest-environment-node, jest-environment-jsdom, jest-runtime]
Add getSeed()
to the jest
object (#13400)[expect, @jest/expect-utils]
Allow isA
utility to take a type argument (#13355)[expect]
Expose AsyncExpectationResult
and SyncExpectationResult
types (#13411)[babel-plugin-jest-hoist]
Ignore TSTypeQuery
when checking for hoisted references (#13367)[jest-core]
Fix detectOpenHandles
false positives for some special objects such as TLSWRAP
(#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 of each
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)[*]
Update @babel/*
deps, resulting in slightly different stack traces for each
(#13422)[jest-runner]
Do not instrument v8 coverage data if coverage should not be collected (#13282)Changelog
29.1.0
[expect, @jest/expect]
Support type inference for function parameters in CalledWith
assertions (#13268)[expect, @jest/expect]
Infer type of *ReturnedWith
matchers argument (#13278)[@jest/environment, jest-runtime]
Allow jest.requireActual
and jest.requireMock
to take a type argument (#13253)[@jest/environment]
Allow jest.mock
and jest.doMock
to take a type argument (#13254)[@jest/fake-timers]
Add jest.now()
to return the current fake clock time (#13244, #13246)[@jest/mock]
Add withImplementation
method for temporarily overriding a mock (#13281)[expect]
Export toThrow*
matchers (#13328)[jest-circus, jest-jasmine2]
Fix error messages for Node's assert.throes
(#13322)[jest-haste-map]
Remove __proto__
usage (#13256)[jest-mock]
Improve spyOn
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)Changelog
29.0.3
[@jest/environment, jest-runtime]
Allow passing a generic type argument to jest.createMockFromModule<T>()
method (#13202)[expect]
Expose ExpectationResult
type (#13240)[jest-snapshot]
Expose Context
type (#13240)[@jest/globals]
Add jest.Mock
type helper (#13235)[jest-core]
Capture execError
during TestScheduler.scheduleTests
and dispatch to reporters (#13203)[jest-resolve]
Make sure to resolve module paths after looking at exports
(#13242)[jest-resolve]
Improve error on module not found deep in the require
stack (#8704)[jest-snapshot]
Fix typings of snapshot matchers (#13240)