@chubbyjs/chubbyjs-mock
Version:
A very strict mocking library for class based objects.
27 lines (26 loc) • 780 B
TypeScript
declare class Call {
private method;
private hasWithValue;
private withValue;
private error;
private hasReturnSelfValue;
private hasReturnValue;
private returnValue;
private returnCallbackValue;
private constructor();
static create(method: string): Call;
with(...withValue: Array<unknown>): Call;
willThrowError(error: Error): Call;
willReturnSelf(): Call;
willReturn(returnValue: any): Call;
willReturnCallback(returnCallback: Function): Call;
getMethod(): string;
hasWith(): boolean;
hasReturnSelf(): boolean;
hasReturn(): boolean;
getWith(): Array<unknown> | undefined;
getError(): Error | undefined;
getReturn(): any;
getReturnCallback(): Function | undefined;
}
export default Call;