class MethodVerifier
extends CallableVerifier
import { MethodVerifier } from "https://deno.land/x/rhum@v2.1.0/src/verifiers/method_verifier.ts";
Test doubles use this class to verify that their methods were called, were called with a number of args, were called with specific types of args, and so on.
Constructors
new
MethodVerifier(methodName?: MethodOf<OriginalObject>)Properties
readonly
method_name: MethodOf<OriginalObject> | nullMethods
toBeCalled(): this
actualCalls: number,
expectedCalls?: number,
codeThatThrew?: string,
Verify that the actual calls match the expected calls.
toBeCalledWithArgs(): this
actualArgs: unknown[],
expectedArgs: unknown[],
codeThatThrew?: string,
Verify that this method was called with the given args.
toBeCalledWithoutArgs(actualArgs: unknown[], codeThatThrew?: string): this
Verify that this method was called without args.