alsatian
Version:
TypeScript and JavaScript testing framework for beautiful and readable tests
19 lines (18 loc) • 854 B
TypeScript
import { FunctionSpy } from "../spying";
import { FunctionSpyMatcher } from "./function-spy-matcher";
import { Matcher } from "./matcher";
import { AnyFunction } from "../_interfaces";
export declare class FunctionMatcher<T extends AnyFunction> extends Matcher<FunctionSpy | T> {
toThrow(): void;
toThrowAsync(): Promise<void>;
toThrowError(errorType: new (...args: Array<any>) => Error, errorMessage: string): void;
toThrowErrorAsync(errorType: new (...args: Array<any>) => Error, errorMessage: string): Promise<void>;
toHaveBeenCalled(): FunctionSpyMatcher;
toHaveBeenCalledWith(...expectedArguments: Parameters<T>): FunctionSpyMatcher;
private _stringifyArguments;
private _getError;
private _getAsyncError;
private _errorMatches;
private _callArgumentsMatch;
private _isFunctionSpyOrSpiedOnFunction;
}