Skip to main content
The Deno 2 Release Candidate is here
Learn more
Module

x/mock/mod.ts>assertSpyCallAsync

Utilities to help mock behavior, spy on function calls, stub methods, and fake time for tests.
Very Popular
Latest
function assertSpyCallAsync
import { assertSpyCallAsync } from "https://deno.land/x/mock@0.15.2/mod.ts";

Asserts that an async spy is called as expected. Returns the call.

Type Parameters

Self
Args extends unknown[]
Return

Parameters

spy: Spy<Self, Args, Promise<Return>>
callIndex: number
optional
expected: ExpectedSpyCall<Self, Args, Promise<Return> | Return>