Skip to main content
Deno 2 is finally here 🎉️
Learn more
Module

std/testing/mock.ts>returnsNext

Deno standard library
Go to Latest
The Standard Library has been moved to JSR. See the blog post for details.
function returnsNext
import { returnsNext } from "https://deno.land/std@0.209.0/testing/mock.ts";

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

Type Parameters

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

Parameters

values: Iterable<Return | Error>

Returns

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