Files
DefinitelyTyped/types/jest-sinon/index.d.ts
Michael Kriese e7c664fcae 🤖 Merge PR #60832 fix(@jest/types): align jest v28 dependencies (requires typescript bump to v4.5) by @viceice
* chore: use jest v28 deps

* chore: raise ts version

* chore: update ts to 4.5

`@sinclair/typebox` needs this

* chore: bump ts

* chore: bump ts version

* chore: bump ts

* chore: lower ts to 4.3

Co-authored-by: Simen Bekkhus <sbekkhus91@gmail.com>

* fix: align minimum ts version with readme

Co-authored-by: Simen Bekkhus <sbekkhus91@gmail.com>
2022-06-17 04:47:26 -07:00

94 lines
3.0 KiB
TypeScript

// Type definitions for jest-sinon 1.0
// Project: https://github.com/djkf/jest-sinon/#readme
// Definitions by: Martin Seidel <https://github.com/seidelmartin>
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
// Minimum TypeScript Version: 4.3
/// <reference types="jest" />
/// <reference types="sinon" />
declare namespace jest {
interface Matchers<R, T> {
toHaveBeenAlwaysCalledOn(object: object): R;
toBeAlwaysCalledOn(object: object): R;
toHaveBeenAlwaysCalledWith(...args: any[]): R;
toBeAlwaysCalledWith(...args: any[]): R;
toHaveBeenAlwaysCalledWithExactly(...args: any[]): R;
toBeAlwaysCalledWithExactly(...args: any[]): R;
toHaveBeenAlwaysCalledWithMatch(...args: sinon.SinonMatch[] | any[]): R;
toBeAlwaysCalledWithMatch(...args: sinon.SinonMatch[] | any[]): R;
toHaveBeenAlwaysCalledWithNew(): R;
toBeAlwaysCalledWithNew(): R;
toHaveBeenCalled(): R;
toBeCalled(): R;
toHaveBeenCalledAfter(spy: sinon.SinonSpy): R;
toBeCalledAfter(spy: sinon.SinonSpy): R;
toHaveBeenCalledBefore(spy: sinon.SinonSpy): R;
toBeCalledBefore(spy: sinon.SinonSpy): R;
toHaveBeenCalledImmediatelyAfter(spy: sinon.SinonSpy): R;
toBeCalledImmediatelyAfter(spy: sinon.SinonSpy): R;
toHaveBeenCalledImmediatelyBefore(spy: sinon.SinonSpy): R;
toBeCalledImmediatelyBefore(spy: sinon.SinonSpy): R;
toHaveBeenCalledOn(object: object): R;
toBeCalledOn(object: object): R;
toHaveBeenCalledOnce(): R;
toBeCalledOnce(): R;
toHaveBeenCalledOnceWith(...args: any[]): R;
toBeCalledOnceWith(...args: any[]): R;
toHaveBeenCalledOnceWithExactly(...args: any[]): R;
toBeCalledOnceWithExactly(...args: any[]): R;
toHaveBeenCalledTwice(): R;
toBeCalledTwice(): R;
toHaveBeenCalledThrice(): R;
toBeCalledThrice(): R;
toHaveBeenCalledWith(...args: any[]): R;
toBeCalledWith(...args: any[]): R;
toHaveBeenCalledWithExactly(...args: any[]): R;
toBeCalledWithExactly(...args: any[]): R;
toHaveBeenCalledWithMatch(...args: sinon.SinonMatch[] | any[]): R;
toBeCalledWithMatch(...args: sinon.SinonMatch[] | any[]): R;
toHaveBeenCalledWithNew(): R;
toBeCalledWithNew(): R;
toHaveCallCount(callCount: number): R;
toHaveBeenCalledTimes(callCount: number): R;
toBeCalledTimes(callCount: number): R;
toHaveReturnedWith(obj: any): R;
toReturnWith(obj: any): R;
toHaveReturned(obj: any): R;
toReturn(obj: any): R;
toHaveAlwaysReturnedWith(obj: any): R;
toAlwaysReturnWith(obj: any): R;
toHaveThrown(error?: any): R;
toThrow(error?: any): R;
toThrowError(error?: any): R;
toHaveAlwaysThrown(error?: any): R;
toHaveAlwaysThrownError(error?: any): R;
toAlwaysThrow(error?: any): R;
toAlwaysThrowError(error?: any): R;
}
}