Skip to main content
The Deno 2 Release Candidate is here
Learn more
Module

x/lophus/lib/std/assert.ts

Fully-modular TypeScript implementation of the Nostr protocol, oriented to web standards and edge environments
Latest
import * as lophus from "https://deno.land/x/lophus@0.0.13/lib/std/assert.ts";

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, error will be thrown if expr have truthy value.

Make an assertion that obj is an instance of type. 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.