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

x/molt/lib/std/assert.ts

Update dependencies the Deno way
Latest
import * as molt from "https://deno.land/x/molt@0.17.2/lib/std/assert.ts";

Classes

Error thrown when an assertion fails.

Functions

Make an assertion, error will be thrown if expr does not have truthy value.

Make an assertion that actual includes the expected values. If not then an error will be thrown.

Make an assertion that actual and expected are equal, deeply. If not deeply equal, then throw.

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

Make an assertion that obj is an instance of type. If not then throw.

Make an assertion that actual and expected are not equal, deeply. If not then throw.

Make an assertion that actual object is a subset of expected object, deeply. If not, then throw.

Executes a function which returns a promise, expecting it to reject.

Executes a function, expecting it to throw. If it does not, then it throws.