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

x/test_suite/test_deps.ts

An extension of Deno's built-in test runner to add setup/teardown hooks and make it easier to organize tests in a format similar to Jasmine, Jest, and Mocha.
Latest
import * as testSuite from "https://deno.land/x/test_suite@0.16.1/test_deps.ts";

Functions

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

Make an assertion that actual and expected are equal, deeply. If not deeply equal, 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 throw or reject. If it does not, then it throws. An error class and a string that should be included in the error message can also be asserted. Or you can pass a callback which will be passed the error, usually to apply some custom assertions on it.

Asserts that a spy is called as expected.

Asserts that a spy is called as much as expected and no more.

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

Executes a function, expecting it to throw. If it does not, then it throws. An error class and a string that should be included in the error message can also be asserted. Or you can pass a callback which will be passed the error, usually to apply some custom assertions on it.

Wraps a function or instance method with a Spy.

Replaces an instance method with a Stub.

Interfaces

A function or instance method wrapper that records all calls made to it.

Call information recorded by a spy.

An instance method replacement that records all calls made to it.