Skip to content

Upgrading @types/jest 27 to 28

Unknown27.5.2 → 28.1.8

Fetching 9 releases from GitHub…0 / 9
UnknownUpgrade verdict

DepDelta is still reading the notes for this range, so breaking changes can't be ruled out yet.

  • DepDelta is still reading the release notes in this range, so it can't rule out breaking changes yet.
  • This page updates as the notes come in.
Still reading release notes

DepDelta is still reading the release notes in this range. This updates as they come in.

Adds expect ^28.0.0.

Drops jest-matcher-utils.

Installs 44 packages in all (was 14).

Also installs @babel/code-frame, @babel/helper-validator-identifier, @jest/expect-utils, @jest/schemas, @jest/types, @sinclair/typebox, @types/istanbul-lib-coverage, @types/istanbul-lib-report, @types/istanbul-reports, @types/node, @types/stack-utils, @types/yargs, @types/yargs-parser, braces, ci-info and 14 more.

Moves diff-sequences 27.5.1 → 28.1.1, jest-diff 27.5.1 → 28.1.3, jest-get-type 27.5.1 → 28.0.2, jest-matcher-utils 27.5.1 → 28.1.3, pretty-format 27.5.1 → 28.1.3, react-is 17.0.2 → 18.3.1. Your build may pick other versions.

Generated by DepDelta from published .d.ts files. Not mixed with prose notes.

  • removed: function jest.spyOn<T extends {}, M extends NonFunctionPropertyNames<Required<T>>>(object: T, method: M, accessType: 'set'): SpyInstance<void, [Required<T>[M]]>
  • removed: index jest.MatcherUtils[other: string]: any
  • removed: interface jest.MatcherState
  • removed: interface jest.MatcherUtils
  • removed: method jest.MatcherUtils.equals(a: any, b: any, customTesters?: EqualityTester[], strictCheck?: boolean): boolean
  • removed: property jest.MatcherState.assertionCalls: number
  • removed: property jest.MatcherState.currentTestName: string
  • removed: property jest.MatcherState.expand: boolean
  • removed: property jest.MatcherState.expectedAssertionsNumber: number
  • removed: property jest.MatcherState.isExpectingAssertions?: boolean | undefined
  • removed: property jest.MatcherState.suppressedErrors: Error[]
  • removed: property jest.MatcherState.testPath: string
  • removed: property jest.MatcherUtils.utils: typeof import('jest-matcher-utils') & { iterableEquality: EqualityTester; subsetEquality: EqualityTester }
  • removed: readonly property jest.MatcherUtils.assertionCalls: number
  • removed: readonly property jest.MatcherUtils.currentTestName: string
  • removed: readonly property jest.MatcherUtils.dontThrow: () => void
  • removed: readonly property jest.MatcherUtils.expand: boolean
  • removed: readonly property jest.MatcherUtils.expectedAssertionsNumber: number | null
  • removed: readonly property jest.MatcherUtils.isExpectingAssertions: boolean
  • removed: readonly property jest.MatcherUtils.isNot: boolean
  • removed: readonly property jest.MatcherUtils.promise: string
  • removed: readonly property jest.MatcherUtils.suppressedErrors: any[]
  • removed: readonly property jest.MatcherUtils.testPath: string
  • changed: function jest.retryTimes(numRetries: number): typeof jest → function jest.retryTimes(numRetries: number, options?: { logErrorsBeforeRetry?: boolean }): typeof jest
  • changed: function jest.spyOn<T extends {}, M extends FunctionPropertyNames<Required<T>>>(object: T, method: M): Required<T>[M] extends (...args: any[]) => any ? SpyInstance<ReturnType<Required<T>[M]>, ArgsType<Required<T>[M]>> : never → function jest.spyOn<T extends {}, Key extends keyof T, A extends PropertyAccessors<Key, T> = PropertyAccessors<Key, T>, Value extends Required<T>[Key] = Required<T>[Key]>(object: T, method: Key, accessType: A): A extends SetAccessor ? SpyInstance<void, [Value]> : A extends GetAccessor ? SpyInstance<Value, []> : Value extends Constructor ? SpyInstance<InstanceType<Value>, ConstructorArgsType<Value…
  • changed: function jest.spyOn<T extends {}, M extends NonFunctionPropertyNames<Required<T>>>(object: T, method: M, accessType: 'get'): SpyInstance<Required<T>[M], []> → function jest.spyOn<T extends {}, M extends FunctionPropertyNames<Required<T>>>(object: T, method: M): FunctionProperties<Required<T>>[M] extends Func ? SpyInstance<ReturnType<FunctionProperties<Required<T>>[M]>, ArgsType<FunctionProperties<Required<T>>[M]>> : never
  • changed: function jest.useFakeTimers(implementation?: 'modern' | 'legacy'): typeof jest → function jest.useFakeTimers(config?: FakeTimersConfig): typeof jest
  • changed: 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… → 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…
  • changed: type jest.ConstructorPropertyNames<T> = { [K in keyof T]: T[K] extends new (...args: any[]) => any ? K : never }[keyof T] & string → type jest.ConstructorPropertyNames<T> = { [K in keyof T]: T[K] extends Constructor ? K : never }[keyof T] & string
  • changed: type jest.FunctionPropertyNames<T> = { [K in keyof T]: T[K] extends (...args: any[]) => any ? K : never }[keyof T] & string → type jest.FunctionPropertyNames<T> = keyof FunctionProperties<T>
  • changed: type jest.JestMatchersShape<TNonPromise extends {} = {}, TPromise extends {} = {}> = { resolves: AndNot<TPromise>, rejects: AndNot<TPromise> } & AndNot<TNonPromise> → type jest.JestMatchersShape<TNonPromise extends {} = {}, TPromise extends {} = {}> = { resolves: AndNot<TPromise>; rejects: AndNot<TPromise> } & AndNot<TNonPromise>
  • changed: type jest.NonAsyncMatchers<TMatchers extends ExpectExtendMap> = { [K in keyof TMatchers]: ReturnType<TMatchers[K]> extends Promise<CustomMatcherResult>? never: K }[keyof TMatchers] → type jest.NonAsyncMatchers<TMatchers extends ExpectExtendMap> = { [K in keyof TMatchers]: ReturnType<TMatchers[K]> extends Promise<CustomMatcherResult> ? never : K }[keyof TMatchers]
  • changed: type jest.NonFunctionPropertyNames<T> = { [K in keyof T]: T[K] extends (...args: any[]) => any ? never : K }[keyof T] & string → type jest.NonFunctionPropertyNames<T> = keyof { [K in keyof T as T[K] extends Func ? never : K]: T[K] }
  • changed: type jest.RemoveFirstFromTuple<T extends any[]> = T['length'] extends 0 ? [] : (((...b: T) => void) extends (a: any, ...b: infer I) => void ? I : []) → type jest.RemoveFirstFromTuple<T extends any[]> = T['length'] extends 0 ? [] : ((...b: T) => void) extends (a: any, ...b: infer I) => void ? I : []
  • added: interface FakeTimersConfig
  • added: interface ImportMeta
  • added: method jest.Expect.closeTo(num: number, numDigits?: number): any
  • added: property FakeTimersConfig.advanceTimers?: boolean | number
  • added: property FakeTimersConfig.doNotFake?: FakeableAPI[]
  • added: property FakeTimersConfig.legacyFakeTimers?: boolean
  • added: property FakeTimersConfig.now?: number | Date
  • added: property FakeTimersConfig.timerLimit?: number
  • added: property ImportMeta.jest: typeof jest
  • added: property jest.It.failing: It
  • added: type FakeableAPI = 'Date' | 'hrtime' | 'nextTick' | 'performance' | 'queueMicrotask' | 'requestAnimationFrame' | 'cancelAnimationFrame' | 'requestIdleCallback' | 'cancelIdleCallb…
  • added: type jest.Constructor = new (...args: any[]) => any
  • added: type jest.Func = (...args: any[]) => any
  • added: type jest.FunctionProperties<T> = { [K in keyof T as T[K] extends (...args: any[]) => any ? K : never]: T[K] }
  • added: type jest.GetAccessor = 'get'
  • added: type jest.MatcherState = Pick<import('expect').MatcherState, | 'assertionCalls' | 'currentTestName' | 'expand' | 'expectedAssertionsNumber' | 'isExpectingAssertions' | 'suppressedError…
  • added: type jest.MatcherUtils = Pick<import('expect').MatcherState, | 'isNot' | 'dontThrow' | 'promise' | 'assertionCalls' | 'expectedAssertionsNumber' | 'isExpectingAssertions' | 'suppressed…
  • added: type jest.PropertyAccessors<M extends keyof T, T extends {}> = M extends NonFunctionPropertyNames<Required<T>> ? GetAccessor | SetAccessor : never
  • added: type jest.SetAccessor = 'set'