Upgrading @types/jest 22 to 23
Unknown22.2.3 → 23.3.14
Fetching 25 releases from GitHub…0 / 25
UnknownUpgrade verdict
DepDelta is still reading the notes for this range, so breaking changes can't be ruled out yet.
In plain terms
- 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.
Must act Still reading release notes
DepDelta is still reading the release notes in this range. This updates as they come in.
API changes
Generated by DepDelta from published .d.ts files. Not mixed with prose notes.
- removed:
method jest.SpyInstance.mockRestore(): void - changed:
call jest.Expect(actual: any): Matchers<void> → call jest.Expect<T = any>(actual: T): Matchers<T> - changed:
call jest.Mock(...args: any[]): any → call jest.Mock(...args: Y): T - changed:
function fail(error?: any): void → function fail(error?: any): never - changed:
function jest.fn<T extends {}>(implementation: (...args: any[]) => T): Mock<T> → function jest.fn(): Mock - changed:
function jest.fn<T>(implementation?: (...args: any[]) => any): Mock<T> → function jest.fn<T, Y extends any[]>(implementation: (...args: Y) => T): Mock<T, Y> - changed:
function jest.isMockFunction(fn: any): fn is Mock<any> → function jest.isMockFunction(fn: any): fn is Mock - changed:
function jest.spyOn<T extends {}, M extends keyof T>(object: T, method: M, accessType?: 'get' | 'set'): SpyInstance<T[M]> → function jest.spyOn<T extends {}, M extends keyof T>(object: T, method: M): T[M] extends (...args: any[]) => any ? SpyInstance<ReturnType<T[M]>, ArgsType<T[M]>> : never - changed:
index jest.ExpectExtendMap[key: string]: (this: MatcherUtils, received: any, ...actual: any[]) => { message(): string, pass: boolean } → index jest.ExpectExtendMap[key: string]: CustomMatcher - changed:
interface jest.Mock<T = {}> extends Function, MockInstance<T> → interface jest.Mock<T = any, Y extends any[] = any> extends Function, MockInstance<T, Y> - changed:
interface jest.MockContext<T> → interface jest.MockContext<T, Y extends any[]> - changed:
interface jest.MockInstance<T> → interface jest.MockInstance<T, Y extends any[]> - changed:
interface jest.SpyInstance<T = {}> extends MockInstance<T> → interface jest.SpyInstance<T = any, Y extends any[] = any> extends MockInstance<T, Y> - changed:
method jest.Matchers.toThrow(error?: string | Constructable | RegExp): R → method jest.Matchers.toThrow(error?: string | Constructable | RegExp | Error): R - changed:
method jest.Matchers.toThrowError(error?: string | Constructable | RegExp): R → method jest.Matchers.toThrowError(error?: string | Constructable | RegExp | Error): R - changed:
method jest.MockInstance.mockImplementation(fn: (...args: any[]) => any): Mock<T> → method jest.MockInstance.mockImplementation(fn?: (...args: Y) => T): Mock<T, Y> - changed:
method jest.MockInstance.mockImplementationOnce(fn: (...args: any[]) => any): Mock<T> → method jest.MockInstance.mockImplementationOnce(fn: (...args: Y) => T): Mock<T, Y> - changed:
method jest.MockInstance.mockName(name: string): Mock<T> → method jest.MockInstance.mockName(name: string): Mock<T, Y> - changed:
method jest.MockInstance.mockRejectedValue(value: any): Mock<T> → method jest.MockInstance.mockRejectedValue(value: any): Mock<Promise<T>, Y> - changed:
method jest.MockInstance.mockRejectedValueOnce(value: any): Mock<T> → method jest.MockInstance.mockRejectedValueOnce(value: any): Mock<Promise<T>, Y> - changed:
method jest.MockInstance.mockResolvedValue(value: any): Mock<T> → method jest.MockInstance.mockResolvedValue(value: T | PromiseLike<T>): Mock<Promise<T>, Y> - changed:
method jest.MockInstance.mockResolvedValueOnce(value: any): Mock<T> → method jest.MockInstance.mockResolvedValueOnce(value: T | PromiseLike<T>): Mock<Promise<T>, Y> - changed:
method jest.MockInstance.mockReturnThis(): Mock<T> → method jest.MockInstance.mockReturnThis(): Mock<T, Y> - changed:
method jest.MockInstance.mockReturnValue(value: any): Mock<T> → method jest.MockInstance.mockReturnValue(value: T): Mock<T, Y> - changed:
method jest.MockInstance.mockReturnValueOnce(value: any): Mock<T> → method jest.MockInstance.mockReturnValueOnce(value: T): Mock<T, Y> - changed:
new jest.Mock(...args: any[]): T → new jest.Mock(...args: Y): T - changed:
property jest.MockContext.calls: any[][] → property jest.MockContext.calls: Y[] - changed:
property jest.MockInstance.mock: MockContext<T> → property jest.MockInstance.mock: MockContext<T, Y> - changed:
type jest.Mocked<T> = { [P in keyof T]: T[P] & MockInstance<T[P]> } & T → type jest.Mocked<T> = { [P in keyof T]: T[P] & MockInstance<T[P], ArgsType<T[P]>> } & T - added:
call jest.Each(cases: any[]): (name: string, fn: (...args: any[]) => any) => void - added:
call jest.Each(strings: TemplateStringsArray, ...placeholders: any[]): (name: string, fn: (arg: any) => any) => void - added:
function jest.requireActual(moduleName: string): any - added:
function jest.requireMock(moduleName: string): any - added:
function jest.spyOn<T extends {}, M extends keyof T>(object: T, method: M, accessType: 'get'): SpyInstance<T[M], []> - added:
function jest.spyOn<T extends {}, M extends keyof T>(object: T, method: M, accessType: 'set'): SpyInstance<void, [T[M]]> - added:
interface jest.CustomMatcherResult - added:
interface jest.DefaultOptions - added:
interface jest.Each - added:
interface jest.InitialOptions - added:
interface jest.InverseAsymmetricMatchers - added:
interface jest.MockResult - added:
method jest.InverseAsymmetricMatchers.arrayContaining(arr: any[]): any - added:
method jest.InverseAsymmetricMatchers.objectContaining(obj: {}): any - added:
method jest.InverseAsymmetricMatchers.stringContaining(str: string): any - added:
method jest.InverseAsymmetricMatchers.stringMatching(str: string | RegExp): any - added:
method jest.MatcherUtils.equals(a: any, b: any): boolean - added:
method jest.Matchers.lastReturnedWith(value: any): R - added:
method jest.Matchers.nthCalledWith(nthCall: number, ...params: any[]): R - added:
method jest.Matchers.nthReturnedWith(n: number, value: any): R - added:
method jest.Matchers.toBeCalledTimes(expected: number): R - added:
method jest.Matchers.toHaveBeenNthCalledWith(nthCall: number, ...params: any[]): R - added:
method jest.Matchers.toHaveLastReturnedWith(expected: any): R - added:
method jest.Matchers.toHaveNthReturnedWith(nthCall: number, expected: any): R - added:
method jest.Matchers.toHaveReturned(): R - added:
method jest.Matchers.toHaveReturnedTimes(expected: number): R - added:
method jest.Matchers.toHaveReturnedWith(expected: any): R - added:
method jest.Matchers.toMatchInlineSnapshot(snapshot?: string): R - added:
method jest.Matchers.toMatchInlineSnapshot<T extends { [P in keyof R]: any }>(propertyMatchers: Partial<T>, snapshot?: string): R - added:
method jest.Matchers.toMatchSnapshot<T extends { [P in keyof R]: any }>(propertyMatchers: Partial<T>, snapshotName?: string): R - added:
method jest.Matchers.toReturn(): R - added:
method jest.Matchers.toReturnTimes(count: number): R - added:
method jest.Matchers.toReturnWith(value: any): R - added:
method jest.Matchers.toStrictEqual(expected: {}): R - added:
method jest.Matchers.toThrowErrorMatchingInlineSnapshot(snapshot?: string): R - added:
method jest.MockInstance.mockRestore(): void - added:
property jest.CustomMatcherResult.message: string | (() => string) - added:
property jest.CustomMatcherResult.pass: boolean - added:
property jest.DefaultOptions.automock: boolean - added:
property jest.DefaultOptions.bail: boolean - added:
property jest.DefaultOptions.browser: boolean - added:
property jest.DefaultOptions.cache: boolean - added:
property jest.DefaultOptions.cacheDirectory: Path - added:
property jest.DefaultOptions.changedFilesWithAncestor: boolean - added:
property jest.DefaultOptions.clearMocks: boolean - added:
property jest.DefaultOptions.collectCoverage: boolean - added:
property jest.DefaultOptions.collectCoverageFrom: Maybe<string[]> - added:
property jest.DefaultOptions.coverageDirectory: Maybe<string> - added:
property jest.DefaultOptions.coveragePathIgnorePatterns: string[] - added:
property jest.DefaultOptions.coverageReporters: string[] - added:
property jest.DefaultOptions.coverageThreshold: Maybe<{ global: { [key: string]: number } }> - added:
property jest.DefaultOptions.detectLeaks: boolean - added:
property jest.DefaultOptions.detectOpenHandles: boolean - added:
property jest.DefaultOptions.errorOnDeprecated: boolean - added:
property jest.DefaultOptions.expand: boolean - added:
property jest.DefaultOptions.filter: Maybe<Path> - added:
property jest.DefaultOptions.forceCoverageMatch: Glob[] - added:
property jest.DefaultOptions.globalSetup: Maybe<string> - added:
property jest.DefaultOptions.globalTeardown: Maybe<string> - added:
property jest.DefaultOptions.globals: ConfigGlobals - added:
property jest.DefaultOptions.haste: HasteConfig - added:
property jest.DefaultOptions.moduleDirectories: string[] - added:
property jest.DefaultOptions.moduleFileExtensions: string[] - added:
property jest.DefaultOptions.moduleNameMapper: { [key: string]: string } - added:
property jest.DefaultOptions.modulePathIgnorePatterns: string[] - added:
property jest.DefaultOptions.noStackTrace: boolean - added:
property jest.DefaultOptions.notify: boolean - added:
property jest.DefaultOptions.notifyMode: string - added:
property jest.DefaultOptions.preset: Maybe<string> - added:
property jest.DefaultOptions.projects: Maybe<Array<string | ProjectConfig>> - added:
property jest.DefaultOptions.resetMocks: boolean - added:
property jest.DefaultOptions.resetModules: boolean - added:
property jest.DefaultOptions.resolver: Maybe<Path> - added:
property jest.DefaultOptions.restoreMocks: boolean - added:
property jest.DefaultOptions.rootDir: Maybe<Path> - added:
property jest.DefaultOptions.roots: Maybe<Path[]> - added:
property jest.DefaultOptions.runTestsByPath: boolean - added:
property jest.DefaultOptions.runner: string - added:
property jest.DefaultOptions.setupFiles: Path[] - added:
property jest.DefaultOptions.setupTestFrameworkScriptFile: Maybe<Path> - added:
property jest.DefaultOptions.skipFilter: boolean - added:
property jest.DefaultOptions.snapshotSerializers: Path[] - added:
property jest.DefaultOptions.testEnvironment: string - added:
property jest.DefaultOptions.testEnvironmentOptions: object - added:
property jest.DefaultOptions.testFailureExitCode: string | number - added:
property jest.DefaultOptions.testLocationInResults: boolean - added:
property jest.DefaultOptions.testMatch: Glob[] - added:
property jest.DefaultOptions.testPathIgnorePatterns: string[] - added:
property jest.DefaultOptions.testRegex: string - added:
property jest.DefaultOptions.testResultsProcessor: Maybe<string> - added:
property jest.DefaultOptions.testRunner: Maybe<string> - added:
property jest.DefaultOptions.testURL: string - added:
property jest.DefaultOptions.timers: 'real' | 'fake' - added:
property jest.DefaultOptions.transform: Maybe<{ [key: string]: string }> - added:
property jest.DefaultOptions.transformIgnorePatterns: Glob[] - added:
property jest.DefaultOptions.useStderr: boolean - added:
property jest.DefaultOptions.verbose: Maybe<boolean> - added:
property jest.DefaultOptions.watch: boolean - added:
property jest.DefaultOptions.watchPathIgnorePatterns: string[] - added:
property jest.DefaultOptions.watchman: boolean - added:
property jest.Describe.each: Each - added:
property jest.Expect.not: InverseAsymmetricMatchers - added:
property jest.InitialOptions.automock?: boolean - added:
property jest.InitialOptions.bail?: boolean - added:
property jest.InitialOptions.browser?: boolean - added:
property jest.InitialOptions.cache?: boolean - added:
property jest.InitialOptions.cacheDirectory?: Path - added:
property jest.InitialOptions.changedFilesWithAncestor?: boolean - added:
property jest.InitialOptions.changedSince?: string - added:
property jest.InitialOptions.clearMocks?: boolean - added:
property jest.InitialOptions.collectCoverage?: boolean - added:
property jest.InitialOptions.collectCoverageFrom?: Glob[] - added:
property jest.InitialOptions.collectCoverageOnlyFrom?: { [key: string]: boolean } - added:
property jest.InitialOptions.coverageDirectory?: string - added:
property jest.InitialOptions.coveragePathIgnorePatterns?: string[] - added:
property jest.InitialOptions.coverageReporters?: string[] - added:
property jest.InitialOptions.coverageThreshold?: { global: { [key: string]: number } } - added:
property jest.InitialOptions.detectLeaks?: boolean - added:
property jest.InitialOptions.detectOpenHandles?: boolean - added:
property jest.InitialOptions.displayName?: string - added:
property jest.InitialOptions.errorOnDeprecated?: boolean - added:
property jest.InitialOptions.expand?: boolean - added:
property jest.InitialOptions.filter?: Path - added:
property jest.InitialOptions.findRelatedTests?: boolean - added:
property jest.InitialOptions.forceCoverageMatch?: Glob[] - added:
property jest.InitialOptions.forceExit?: boolean - added:
property jest.InitialOptions.globalSetup?: Maybe<string> - added:
property jest.InitialOptions.globalTeardown?: Maybe<string> - added:
property jest.InitialOptions.globals?: ConfigGlobals - added:
property jest.InitialOptions.haste?: HasteConfig - added:
property jest.InitialOptions.json?: boolean - added:
property jest.InitialOptions.lastCommit?: boolean - added:
property jest.InitialOptions.listTests?: boolean - added:
property jest.InitialOptions.logHeapUsage?: boolean - added:
property jest.InitialOptions.mapCoverage?: boolean - added:
property jest.InitialOptions.moduleDirectories?: string[] - added:
property jest.InitialOptions.moduleFileExtensions?: string[] - added:
property jest.InitialOptions.moduleLoader?: Path - added:
property jest.InitialOptions.moduleNameMapper?: { [key: string]: string } - added:
property jest.InitialOptions.modulePathIgnorePatterns?: string[] - added:
property jest.InitialOptions.modulePaths?: string[] - added:
property jest.InitialOptions.name?: string - added:
property jest.InitialOptions.noStackTrace?: boolean - added:
property jest.InitialOptions.notify?: boolean - added:
property jest.InitialOptions.notifyMode?: string - added:
property jest.InitialOptions.onlyChanged?: boolean - added:
property jest.InitialOptions.outputFile?: Path - added:
property jest.InitialOptions.passWithNoTests?: boolean - added:
property jest.InitialOptions.preprocessorIgnorePatterns?: Glob[] - added:
property jest.InitialOptions.preset?: Maybe<string> - added:
property jest.InitialOptions.projects?: Glob[] - added:
property jest.InitialOptions.replname?: Maybe<string> - added:
property jest.InitialOptions.reporters?: Array<ReporterConfig | string> - added:
property jest.InitialOptions.resetMocks?: boolean - added:
property jest.InitialOptions.resetModules?: boolean - added:
property jest.InitialOptions.resolver?: Maybe<Path> - added:
property jest.InitialOptions.restoreMocks?: boolean - added:
property jest.InitialOptions.rootDir?: Path - added:
property jest.InitialOptions.roots?: Path[] - added:
property jest.InitialOptions.runTestsByPath?: boolean - added:
property jest.InitialOptions.runner?: string - added:
property jest.InitialOptions.scriptPreprocessor?: string - added:
property jest.InitialOptions.setupFiles?: Path[] - added:
property jest.InitialOptions.setupTestFrameworkScriptFile?: Path - added:
property jest.InitialOptions.silent?: boolean - added:
property jest.InitialOptions.skipFilter?: boolean - added:
property jest.InitialOptions.skipNodeResolution?: boolean - added:
property jest.InitialOptions.snapshotSerializers?: Path[] - added:
property jest.InitialOptions.testEnvironment?: string - added:
property jest.InitialOptions.testEnvironmentOptions?: object - added:
property jest.InitialOptions.testFailureExitCode?: string | number - added:
property jest.InitialOptions.testLocationInResults?: boolean - added:
property jest.InitialOptions.testMatch?: Glob[] - added:
property jest.InitialOptions.testNamePattern?: string - added:
property jest.InitialOptions.testPathDirs?: Path[] - added:
property jest.InitialOptions.testPathIgnorePatterns?: string[] - added:
property jest.InitialOptions.testRegex?: string - added:
property jest.InitialOptions.testResultsProcessor?: Maybe<string> - added:
property jest.InitialOptions.testRunner?: string - added:
property jest.InitialOptions.testURL?: string - added:
property jest.InitialOptions.timers?: 'real' | 'fake' - added:
property jest.InitialOptions.transform?: { [key: string]: string } - added:
property jest.InitialOptions.transformIgnorePatterns?: Glob[] - added:
property jest.InitialOptions.unmockedModulePathPatterns?: string[] - added:
property jest.InitialOptions.updateSnapshot?: boolean - added:
property jest.InitialOptions.useStderr?: boolean - added:
property jest.InitialOptions.verbose?: Maybe<boolean> - added:
property jest.InitialOptions.watch?: boolean - added:
property jest.InitialOptions.watchAll?: boolean - added:
property jest.InitialOptions.watchPathIgnorePatterns?: string[] - added:
property jest.InitialOptions.watchPlugins?: string[] - added:
property jest.InitialOptions.watchman?: boolean - added:
property jest.It.each: Each - added:
property jest.MockContext.invocationCallOrder: number[] - added:
property jest.MockContext.results: MockResult[] - added:
property jest.MockResult.isThrow: boolean - added:
property jest.MockResult.value: any - added:
readonly property jest.MatcherUtils.expand: boolean - added:
type ArgsType<T> = T extends (...args: infer A) => any ? A : never - added:
type jest.CustomMatcher = (this: MatcherUtils, received: any, ...actual: any[]) => CustomMatcherResult | Promise<CustomMatcherResult>