std/testing/mock.ts

Deno standard library
Go to Latest
function resolvesNext
import { resolvesNext } from "https://deno.land/std@0.146.0/testing/mock.ts?s=resolvesNext";

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

Type Parameters

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

Parameters

iterable: Iterable<Return | Error | Promise<Return | Error>> | AsyncIterable<Return | Error | Promise<Return | Error>>[src]

Returns

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