Skip to main content
Using Deno in production at your company? Earn free Deno merch.
Give us feedback
Go to Latest
method MethodVerifier.prototype.toBeCalled
import { MethodVerifier } from "https://deno.land/x/rhum@v2.1.0-rc.1/src/verifiers/method_verifier.ts";

Verify that the actual calls match the expected calls.

Parameters

actualCalls: number
  • The number of actual calls.
optional
expectedCalls: number
  • The number of calls expected. If this is -1, then just verify that the method was called without checking how many times it was called.
optional
codeThatThrew: string
  • (Optional) A custom display of code that throws.

Returns

this

this To allow method chaining.