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

x/denoexec/deps.ts>testing.assertExists

A higher level wrapper around https://doc.deno.land/builtin/stable#Deno.run
Latest
function testing.assertExists
import { testing } from "https://deno.land/x/denoexec@v1.1.5/deps.ts";
const { assertExists } = testing;

Make an assertion that actual is not null or undefined. If not then throw.

Parameters

actual: T
optional
msg: string

Returns

asserts actual is NonNullable<T>