@types/jest breaking changes
Updated December 4, 2026
On this page
Latest version 30.0.0, released June 16, 2025.
Packages on npm run on Node.js. Node.js end of life dates.
- From 29.5.13 to 30.0.0: 46 breaking changes in 1 version.
- From 28.1.0 to 30.0.0: 172 breaking changes in 27 versions.
@types/jest 30.0.0 breaking changes
- Removed
jest.ExtendedMatchers.lastCalledWith
Use toHaveBeenLastCalledWith instead. npmjs.com - Removed
jest.ExtendedMatchers.lastReturnedWith
Use toHaveLastReturnedWith instead. npmjs.com - Removed
jest.ExtendedMatchers.nthCalledWith
Use toHaveBeenNthCalledWith instead. npmjs.com - Removed
jest.ExtendedMatchers.nthReturnedWith
Use toHaveNthReturnedWith instead. npmjs.com - Removed
jest.ExtendedMatchers.toBeCalled
Use toHaveBeenCalled instead. npmjs.com - Removed
jest.ExtendedMatchers.toBeCalledTimes
Use toHaveBeenCalledTimes instead. npmjs.com - Removed
jest.ExtendedMatchers.toBeCalledWith
Use toHaveBeenCalledWith instead. npmjs.com - Removed
jest.ExtendedMatchers.toReturn
Use toHaveReturned instead. npmjs.com - Removed
jest.ExtendedMatchers.toReturnTimes
Use toHaveReturnedTimes instead. npmjs.com - Removed
jest.ExtendedMatchers.toReturnWith
Use toHaveReturnedWith instead. npmjs.com - Removed
jest.ExtendedMatchers.toThrowError
Use toThrow instead. npmjs.com - Removed
jest.genMockFromModule
jest.genMockFromModule was removed in @types/jest 30.0.0 npmjs.com - Removed
jest.JestExtendedMatchers.lastCalledWith
Use toHaveBeenLastCalledWith instead. npmjs.com - Removed
jest.JestExtendedMatchers.lastReturnedWith
Use toHaveLastReturnedWith instead. npmjs.com - Removed
jest.JestExtendedMatchers.nthCalledWith
Use toHaveBeenNthCalledWith instead. npmjs.com - Removed
jest.JestExtendedMatchers.nthReturnedWith
Use toHaveNthReturnedWith instead. npmjs.com - Removed
jest.JestExtendedMatchers.toBeCalled
Use toHaveBeenCalled instead. npmjs.com - Removed
jest.JestExtendedMatchers.toBeCalledTimes
Use toHaveBeenCalledTimes instead. npmjs.com - Removed
jest.JestExtendedMatchers.toBeCalledWith
Use toHaveBeenCalledWith instead. npmjs.com - Removed
jest.JestExtendedMatchers.toReturn
Use toHaveReturned instead. npmjs.com - Removed
jest.JestExtendedMatchers.toReturnTimes
Use toHaveReturnedTimes instead. npmjs.com - Removed
jest.JestExtendedMatchers.toReturnWith
Use toHaveReturnedWith instead. npmjs.com - Removed
jest.JestExtendedMatchers.toThrowError
Use toThrow instead. npmjs.com - Removed
jest.JestMatchers.lastCalledWith
Use toHaveBeenLastCalledWith instead. npmjs.com - Removed
jest.JestMatchers.lastReturnedWith
Use toHaveLastReturnedWith instead. npmjs.com - Removed
jest.JestMatchers.nthCalledWith
Use toHaveBeenNthCalledWith instead. npmjs.com - Removed
jest.JestMatchers.nthReturnedWith
Use toHaveNthReturnedWith instead. npmjs.com - Removed
jest.JestMatchers.toBeCalled
Use toHaveBeenCalled instead. npmjs.com - Removed
jest.JestMatchers.toBeCalledTimes
Use toHaveBeenCalledTimes instead. npmjs.com - Removed
jest.JestMatchers.toBeCalledWith
Use toHaveBeenCalledWith instead. npmjs.com - Removed
jest.JestMatchers.toReturn
Use toHaveReturned instead. npmjs.com - Removed
jest.JestMatchers.toReturnTimes
Use toHaveReturnedTimes instead. npmjs.com - Removed
jest.JestMatchers.toReturnWith
Use toHaveReturnedWith instead. npmjs.com - Removed
jest.JestMatchers.toThrowError
Use toThrow instead. npmjs.com - Removed
jest.Matchers.lastCalledWith
Use toHaveBeenLastCalledWith instead. npmjs.com - Removed
jest.Matchers.lastReturnedWith
Use toHaveLastReturnedWith instead. npmjs.com - Removed
jest.Matchers.nthCalledWith
Use toHaveBeenNthCalledWith instead. npmjs.com - Removed
jest.Matchers.nthReturnedWith
Use toHaveNthReturnedWith instead. npmjs.com - Removed
jest.Matchers.toBeCalled
Use toHaveBeenCalled instead. npmjs.com - Removed
jest.Matchers.toBeCalledTimes
Use toHaveBeenCalledTimes instead. npmjs.com - Removed
jest.Matchers.toBeCalledWith
Use toHaveBeenCalledWith instead. npmjs.com - Removed
jest.Matchers.toReturn
Use toHaveReturned instead. npmjs.com - Removed
jest.Matchers.toReturnTimes
Use toHaveReturnedTimes instead. npmjs.com - Removed
jest.Matchers.toReturnWith
Use toHaveReturnedWith instead. npmjs.com - Removed
jest.Matchers.toThrowError
Use toThrow instead. npmjs.com - Signature changed
jest.retryTimes
Was function retryTimes(numRetries: number, options?: {logErrorsBeforeRetry?: boolean}): typeof jest; now function retryTimes(numRetries: number, options?: {logErrorsBeforeRetry?: boolean; waitBeforeRetry?: number; retryImmediately?... npmjs.com
@types/jest 29.5.13 breaking changes
- Signature changed
jest.MockOptions.virtual
Was virtual?: boolean | undefined; now virtual?: boolean. npmjs.com
@types/jest 29.5.11 breaking changes
- Signature changed
jest.It.todo
Was todo: It; now todo: (name: string) => void. npmjs.com
@types/jest 29.5.9 breaking changes
- Signature changed
jest.Each.__call
Was (cases: ReadonlyArray<ReadonlyArray<any>>): (name: string, fn: (...args: any[]) => any, timeout?: number) => void; now (cases: ReadonlyArray<readonly any[]>): (name: string, fn: (...args: any[]) => any, timeout?: number) => void. npmjs.com
@types/jest 29.5.5 breaking changes
- Signature changed
jest.ExtendedExpect
Was type ExtendedExpect<TMatchers extends ExpectExtendMap> = ExpectProperties & AndNot<CustomAsyncMatchers<TMatchers>> & ExtendedExpectFunction<TMatchers>; now type ExtendedExpect<TMatchers extends ExpectExtendMap> = & ExpectProperties &... npmjs.com - Signature changed
jest.ExtendedMatchers
Was type ExtendedMatchers<TMatchers extends ExpectExtendMap, TMatcherReturn, TActual> = Matchers<TMatcherReturn, TActual> & {[K in keyof TMatchers]: CustomJestMatcher<TMatchers[K], TMatcherReturn>}; now type ExtendedMatchers<TMatchers... npmjs.com - Signature changed
jest.Mocked
Was type Mocked<T> = {[P in keyof T]: T[P] extends (this: infer C, ...args: any[]) => any ? MockInstance<ReturnType<T[P]>, ArgsType<T[P]>, C> : T[P] extends Constructable ? MockedClass<T[P]> : T[P];} & T; now type Mocked<T> = & {[P in... npmjs.com - Signature changed
jest.MockedClass
Was type MockedClass<T extends Constructable> = MockInstance<InstanceType<T>, T extends new (...args: infer P) => any ? P : never, T extends new (...args: any[]) => infer C ? C : never> & {prototype: T extends {prototype: any} ?... npmjs.com - Signature changed
jest.MockedFunction
Was type MockedFunction<T extends (...args: any[]) => any> = MockInstance<ReturnType<T>, ArgsType<T>, T extends (this: infer C, ...args: any[]) => any ? C : never> & T; now type MockedFunction<T extends (...args: any[]) => any> = &... npmjs.com - Signature changed
jest.MockedObject
Was type MockedObject<T> = MaybeMockedConstructor<T> & {[K in MethodKeysOf<T>]: T[K] extends MockableFunction ? MockedFn<T[K]> : T[K];} & {[K in PropertyKeysOf<T>]: T[K]}; now type MockedObject<T> = & MaybeMockedConstructor<T> & {[K in... npmjs.com - Signature changed
jest.MockedObjectDeep
Was type MockedObjectDeep<T> = MaybeMockedConstructor<T> & {[K in MethodKeysOf<T>]: T[K] extends MockableFunction ? MockedFunctionDeep<T[K]> : T[K];} & {[K in PropertyKeysOf<T>]: MaybeMockedDeep<T[K]>}; now type MockedObjectDeep<T> = &... npmjs.com
@types/jest 29.5.3 breaking changes
- Signature changed
jest.ProvidesCallback
Was type ProvidesCallback = ((cb: DoneCallback) => void | undefined) | (() => Promise<unknown>); now type ProvidesCallback = ((cb: DoneCallback) => void | undefined) | (() => PromiseLike<unknown>). npmjs.com
Older versions
22 older versions, each with its first changes. Sign up to see every change
Show 22 older versions
@types/jest 29.5.2 breaking changes
- Signature changed
jasmine.arrayContaining
Was function arrayContaining(sample: any[]): ArrayContaining; now function arrayContaining(sample: readonly any[]): ArrayContaining. npmjs.com - Signature changed
jasmine.ArrayContaining.__new
Was new (sample: any[]): any; now new (sample: readonly any[]): any. npmjs.com
And 7 more in this version.
@types/jest 29.5.1 breaking changes
- Signature changed
jest.replaceProperty
Was function replaceProperty<T, K extends keyof T>(obj: T, key: K, value: T[K]): ReplaceProperty<T[K]>; now function replaceProperty<T extends object, K extends keyof T>(obj: T, key: K, value: T[K]): ReplaceProperty<T[K]>. npmjs.com
@types/jest 29.4.3 breaking changes
- Signature changed
jest.Each.__call
Was <T extends ReadonlyArray<any>>(cases: ReadonlyArray<T>): (name: string, fn: (...args: T) => any, timeout?: number) => void; now <T extends ReadonlyArray<any>>(cases: ReadonlyArray<T>): (name: string, fn: (...args... npmjs.com
@types/jest 29.4.2 breaking changes
- Signature changed
jest.Each.__call
Was (strings: TemplateStringsArray, ...placeholders: any[]): (name: string, fn: (arg: any) => any, timeout?: number) => void <T>(cases: ReadonlyArray<T>): (name: string, fn: (...args: T[]) => any, timeout?: number) => void; now (strings... npmjs.com
@types/jest 29.4.1 breaking changes
- Removed
ExtractEachCallbackArgs
ExtractEachCallbackArgs was removed in @types/jest 29.4.1 npmjs.com - Signature changed
jest.Each.__call
Was <T extends ReadonlyArray<any>>(cases: ReadonlyArray<T>): (name: string, fn: (...args: ExtractEachCallbackArgs<T>) => any, timeout?: number) => void; now <T extends ReadonlyArray<any>>(cases: ReadonlyArray<T>): (name: string, fn... npmjs.com
@types/jest 29.2.6 breaking changes
- Signature changed
jest.fn
Was function fn<T, Y extends any[]>(implementation?: (...args: Y) => T): Mock<T, Y>; now function fn<T, Y extends any[], C = any>(implementation?: (this: C, ...args: Y) => T): Mock<T, Y, C>. npmjs.com - Signature changed
jest.MaybeMockedConstructor
Was type MaybeMockedConstructor<T> = T extends new (...args: any[]) => infer R ? MockInstance<R, ConstructorArgumentsOf<T>> : T; now type MaybeMockedConstructor<T> = T extends new (...args: any[]) => infer R ? MockInstance<R... npmjs.com
And 12 more in this version.
@types/jest 29.2.4 breaking changes
- Signature changed
jest.Expect.any
Was any<T extends Constructor>(classType: T): T extends Func ? ReturnType<T> : InstanceType<T>; now any(classType: any): any. npmjs.com - Signature changed
jest.ExpectProperties.any
Was any<T extends Constructor>(classType: T): T extends Func ? ReturnType<T> : InstanceType<T>; now any(classType: any): any. npmjs.com
@types/jest 29.2.3 breaking changes
- Signature changed
jest.ConstructorPropertyNames
Was type ConstructorPropertyNames<T> = {[K in keyof T]: T[K] extends Constructor ? K : never}[keyof T] & string; now type ConstructorPropertyNames<T> = RemoveIndex<keyof ConstructorProperties<T>>. npmjs.com - Signature changed
jest.spyOn
Was function spyOn<T extends {}, M extends ConstructorPropertyNames<Required<T>>>(object: T, method: M): Required<T>[M] extends new (...args: any[]) => any ? SpyInstance<InstanceType<Required<T>[M]>, ConstructorArgsType<Required<T>[M]>>... npmjs.com
@types/jest 29.2.2 breaking changes
- Signature changed
jest.SpiedFunction
Was type SpiedFunction<T extends (...args: any[]) => any> = SpyInstance<ReturnType<T>, ArgsType<T>>; now type SpiedFunction<T extends (...args: any) => any> = SpyInstance<ReturnType<T>, ArgsType<T>>. npmjs.com
@types/jest 29.2.1 breaking changes
- Signature changed
jest.Expect.any
Was any(classType: any): any; now any<T extends Constructor>(classType: T): T extends Func ? ReturnType<T> : InstanceType<T>. npmjs.com - Signature changed
jest.ExpectProperties.any
Was any(classType: any): any; now any<T extends Constructor>(classType: T): T extends Func ? ReturnType<T> : InstanceType<T>. npmjs.com
@types/jest 29.1.2 breaking changes
- Signature changed
jest.ExtendedMatchers.lastReturnedWith
Was lastReturnedWith<E = any>(value: E): R; now lastReturnedWith<E = any>(expected?: E): R. npmjs.com - Signature changed
jest.ExtendedMatchers.nthReturnedWith
Was nthReturnedWith<E = any>(n: number, value: E): R; now nthReturnedWith<E = any>(n: number, expected?: E): R. npmjs.com
And 22 more in this version.
@types/jest 29.1.1 breaking changes
- Signature changed
FakeTimersConfig.legacyFakeTimers
Was legacyFakeTimers?: boolean; now legacyFakeTimers?: false. npmjs.com - Signature changed
jest.useFakeTimers
Was function useFakeTimers(config?: FakeTimersConfig): typeof jest; now function useFakeTimers(config?: FakeTimersConfig | LegacyFakeTimersConfig): typeof jest. npmjs.com
@types/jest 29.0.3 breaking changes
- Signature changed
jest.mocked
Was function mocked<T>(item: T, deep: true): MaybeMockedDeep<T> function mocked<T>(item: T, deep?: false): MaybeMocked<T>; now function mocked<T>(source: T, options: {shallow: true}): MaybeMocked<T> function mocked<T>(source: T, options?... npmjs.com
@types/jest 29.0.2 breaking changes
- Signature changed
jest.advanceTimersByTime
Was function advanceTimersByTime(msToRun: number): typeof jest; now function advanceTimersByTime(msToRun: number): void. npmjs.com - Signature changed
jest.clearAllTimers
Was function clearAllTimers(): typeof jest; now function clearAllTimers(): void. npmjs.com
And 4 more in this version.
@types/jest 29.0.1 breaking changes
- Signature changed
jest.MockContext.lastCall
Was lastCall: Y; now lastCall?: Y. npmjs.com
@types/jest 29.0.0 breaking changes
- Signature changed
jest.MatcherState
Was type MatcherState = Pick<import('expect').MatcherState, | 'assertionCalls' | 'currentTestName' | 'expand' | 'expectedAssertionsNumber' | 'isExpectingAssertions' | 'suppressedErrors' | 'testPath'>; now type MatcherState =... npmjs.com - Signature changed
jest.MatcherUtils
Was type MatcherUtils = Pick<import('expect').MatcherState, | 'isNot' | 'dontThrow' | 'promise' | 'assertionCalls' | 'expectedAssertionsNumber' | 'isExpectingAssertions' | 'suppressedErrors' | 'expand' | 'testPath' | 'currentTestName' |... npmjs.com
@types/jest 28.1.8 breaking changes
- Signature changed
ExtractEachCallbackArgs
Was type ExtractEachCallbackArgs<T extends ReadonlyArray<any>> = {1: [T[0]], 2: [T[0], T[1]], 3: [T[0], T[1], T[2]], 4: [T[0], T[1], T[2], T[3]], 5: [T[0], T[1], T[2], T[3], T[4]], 6: [T[0], T[1], T[2], T[3], T[4], T[5]], 7: [T[0], T[1]... npmjs.com - Signature changed
jest.RemoveFirstFromTuple
Was type RemoveFirstFromTuple<T extends any[]> = T['length'] extends 0 ? [] : (((...b: T) => void) extends (a: any, ...b: infer I) => void ? I : []); now type RemoveFirstFromTuple<T extends any[]> = T['length'] extends 0 ? [] : ((...b: T)... npmjs.com
@types/jest 28.1.7 breaking changes
- Removed
jest.MatcherContext.assertionCalls
MatcherContext.assertionCalls was removed in @types/jest 28.1.7 npmjs.com - Removed
jest.MatcherContext.currentTestName
MatcherContext.currentTestName was removed in @types/jest 28.1.7 npmjs.com
And 32 more in this version.
@types/jest 28.1.5 breaking changes
- Signature changed
jest.retryTimes
Was function retryTimes(numRetries: number): typeof jest; now function retryTimes(numRetries: number, options?: {logErrorsBeforeRetry?: boolean}): typeof jest. npmjs.com
@types/jest 28.1.4 breaking changes
- Signature changed
jest.FunctionPropertyNames
Was type FunctionPropertyNames<T> = {[K in keyof T]: T[K] extends Func ? K : never}[keyof T] & string; now type FunctionPropertyNames<T> = keyof FunctionProperties<T>. npmjs.com - Signature changed
jest.NonFunctionPropertyNames
Was type NonFunctionPropertyNames<T> = {[K in keyof T]: T[K] extends Func ? never : K}[keyof T] & string; now type NonFunctionPropertyNames<T> = keyof {[K in keyof T as T[K] extends Func ? never : K]: T[K];}. npmjs.com
And 1 more in this version.
@types/jest 28.1.3 breaking changes
- Signature changed
jest.ConstructorPropertyNames
Was type ConstructorPropertyNames<T> = {[K in keyof T]: T[K] extends new (...args: any[]) => any ? K : never}[keyof T] & string; now type ConstructorPropertyNames<T> = {[K in keyof T]: T[K] extends Constructor ? K : never}[keyof T] &... npmjs.com - Signature changed
jest.FunctionPropertyNames
Was type FunctionPropertyNames<T> = {[K in keyof T]: T[K] extends (...args: any[]) => any ? K : never}[keyof T] & string; now type FunctionPropertyNames<T> = {[K in keyof T]: T[K] extends Func ? K : never}[keyof T] & string. npmjs.com
And 2 more in this version.
@types/jest 28.1.0 breaking changes
- Signature changed
jest.useFakeTimers
Was function useFakeTimers(implementation?: 'modern' | 'legacy'): typeof jest; now function useFakeTimers(config?: FakeTimersConfig): typeof jest. npmjs.com
Related packages
Check your code
These are the changes. To see which of them reach your code, scan a public repository, or have your coding agent call check_code with your manifest or lockfile over MCP. The API reads every change in every version. A fix pull request opens for the changes that reach a connected repository. Nothing merges or deploys.

Put your code on continuous maintenance.
Scan a public repository now, or give your agent one line.
See how out of date your code is.
Tell your agent what changed since it was trained.
claude mcp add --transport http since https://api.since.dev/mcpCodex, Cursor and any MCP client use https://api.since.dev/mcp.