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

x/deno/std/testing/asserts.ts>assertThrowsAsync

A modern runtime for JavaScript and TypeScript.
Go to Latest
function assertThrowsAsync
import { assertThrowsAsync } from "https://deno.land/x/deno@v0.28.0/std/testing/asserts.ts";

Parameters

fn: () => Promise<void>
optional
ErrorClass: Constructor
optional
msgIncludes = [UNSUPPORTED]
optional
msg: string

Returns

Promise<Error>