Module

std/testing/mock.ts>resolvesNext

Deno standard library
Go to Latest
function resolvesNext
import { resolvesNext } from "https://dotland.deno.dev/std@0.181.0/testing/mock.ts";

Creates a function that resolves the awaited iterable values. Any awaited iterable values that are errors will be thrown.

Type Parameters

Return
optional
Self = any
optional
Args extends unknown[] = any[]

Parameters

iterable: Iterable<Return | Error | Promise<Return | Error>> | AsyncIterable<Return | Error | Promise<Return | Error>>

Returns

(this: Self, ...args: Args) => Promise<Return>