Skip to content

Upgrading @types/jest 26 to 27

Unknown26.0.24 → 27.5.2

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 jest-matcher-utils ^27.0.0.

Drops jest-diff.

Installs 14 packages in all (was 20).

No longer installs @jest/types, @types/istanbul-lib-coverage, @types/istanbul-lib-report, @types/istanbul-reports, @types/node, @types/yargs, @types/yargs-parser, undici-types.

Moves ansi-styles 4.3.0 → 4.3.0, 5.2.0, diff-sequences 26.6.2 → 27.5.1, jest-diff 26.6.2 → 27.5.1, jest-get-type 26.3.0 → 27.5.1, pretty-format 26.6.2 → 27.5.1. Your build may pick other versions.

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

  • removed: call jest.ChalkFunction(...text: any[]): string
  • removed: call jest.ChalkFunction(text: TemplateStringsArray, ...placeholders: any[]): string
  • removed: function jasmine.addMatchers(matchers: CustomMatcherFactories): void
  • removed: function jest.addMatchers(matchers: jasmine.CustomMatcherFactories): typeof jest
  • removed: function jest.resetModuleRegistry(): typeof jest
  • removed: function jest.runTimersToTime(msToRun: number): typeof jest
  • removed: interface jest.ChalkColorSupport
  • removed: interface jest.ChalkFunction
  • removed: interface jest.MatcherHintOptions
  • removed: property jest.ChalkColorSupport.has16m: boolean
  • removed: property jest.ChalkColorSupport.has256: boolean
  • removed: property jest.ChalkColorSupport.hasBasic: boolean
  • removed: property jest.ChalkColorSupport.level: 0 | 1 | 2 | 3
  • removed: property jest.MatcherHintOptions.comment?: string | undefined
  • removed: property jest.MatcherHintOptions.expectedColor?: MatcherHintColor | undefined
  • removed: property jest.MatcherHintOptions.isDirectExpectCall?: boolean | undefined
  • removed: property jest.MatcherHintOptions.isNot?: boolean | undefined
  • removed: property jest.MatcherHintOptions.promise?: string | undefined
  • removed: property jest.MatcherHintOptions.receivedColor?: MatcherHintColor | undefined
  • removed: property jest.MatcherHintOptions.secondArgument?: string | undefined
  • removed: property jest.MatcherHintOptions.secondArgumentColor?: MatcherHintColor | undefined
  • removed: type jest.MatcherColorFn = ChalkFunction & { supportsColor: ChalkColorSupport }
  • removed: type jest.MatcherHintColor = (arg: string) => string
  • removed: type jest.PrintLabel = (string: string) => string
  • changed: function jest.doMock(moduleName: string, factory?: () => unknown, options?: MockOptions): typeof jest → function jest.doMock<T = unknown>(moduleName: string, factory?: () => T, options?: MockOptions): typeof jest
  • changed: function jest.mock(moduleName: string, factory?: () => unknown, options?: MockOptions): typeof jest → function jest.mock<T = unknown>(moduleName: string, factory?: () => T, options?: MockOptions): typeof jest
  • changed: property jest.MatcherUtils.utils: { readonly EXPECTED_COLOR: MatcherColorFn; readonly RECEIVED_COLOR: MatcherColorFn; readonly INVERTED_COLOR: MatcherColorFn; readonly BOLD_WEIGHT: MatcherColorFn; readonly DIM_COLOR: MatcherColorFn; readonly SUGGEST_TO_CONTAIN_EQUAL: string; diff(a: any, b: any, options?: import('jest-diff').DiffOptions): string | null; ensureActualIsNumber(actual: any, matcherNa… → property jest.MatcherUtils.utils: typeof import('jest-matcher-utils') & { iterableEquality: EqualityTester; subsetEquality: EqualityTester }
  • changed: type jest.Lifecycle = (fn: ProvidesCallback, timeout?: number) => any → type jest.Lifecycle = (fn: ProvidesHookCallback, timeout?: number) => any
  • changed: type jest.ProvidesCallback = (cb: DoneCallback) => any → type jest.ProvidesCallback = ((cb: DoneCallback) => void | undefined) | (() => Promise<unknown>)
  • added: call jest.MockWithArgs(...args: ArgumentsOf<T>): ReturnType<T>
  • added: function jest.mocked<T>(item: T, deep: true): MaybeMockedDeep<T>
  • added: function jest.mocked<T>(item: T, deep?: false): MaybeMocked<T>
  • added: interface jest.MockWithArgs<T extends MockableFunction> extends MockInstance<ReturnType<T>, ArgumentsOf<T>>
  • added: new jest.MockWithArgs(...args: ConstructorArgumentsOf<T>): T
  • added: property jest.MockContext.lastCall: Y
  • added: type jest.ArgumentsOf<T> = T extends (...args: infer A) => any ? A : never
  • added: type jest.ConstructorArgumentsOf<T> = T extends new (...args: infer A) => any ? A : never
  • added: type jest.MaybeMocked<T> = T extends MockableFunction ? MockedFn<T> : T extends object ? MockedObject<T> : T
  • added: type jest.MaybeMockedConstructor<T> = T extends new (...args: any[]) => infer R ? MockInstance<R, ConstructorArgumentsOf<T>> : T
  • added: type jest.MaybeMockedDeep<T> = T extends MockableFunction ? MockedFunctionDeep<T> : T extends object ? MockedObjectDeep<T> : T
  • added: type jest.MethodKeysOf<T> = { [K in keyof T]: T[K] extends MockableFunction ? K : never }[keyof T]
  • added: type jest.MockableFunction = (...args: any[]) => any
  • added: type jest.MockedFn<T extends MockableFunction> = MockWithArgs<T> & { [K in keyof T]: T[K] }
  • added: type jest.MockedFunctionDeep<T extends MockableFunction> = MockWithArgs<T> & MockedObjectDeep<T>
  • added: type jest.MockedObject<T> = MaybeMockedConstructor<T> & { [K in MethodKeysOf<T>]: T[K] extends MockableFunction ? MockedFn<T[K]> : T[K] } & { [K in PropertyKeysOf<T>]: T[K] }
  • added: type jest.MockedObjectDeep<T> = MaybeMockedConstructor<T> & { [K in MethodKeysOf<T>]: T[K] extends MockableFunction ? MockedFunctionDeep<T[K]> : T[K] } & { [K in PropertyKeysOf<T>]: MaybeMock…
  • added: type jest.PropertyKeysOf<T> = { [K in keyof T]: T[K] extends MockableFunction ? never : K }[keyof T]
  • added: type jest.ProvidesHookCallback = (() => any) | ProvidesCallback