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

x/deno/std/testing/mod.ts

A modern runtime for JavaScript and TypeScript.
Go to Latest
import * as deno from "https://deno.land/x/deno@v0.28.0/std/testing/mod.ts";

Functions

Make an assertion, if not true, then throw.

Make an assertion that actual contains the expected values If not then thrown.

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

Make an assertion that actual match RegExp expected. If not then thrown

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

Make an assertion that actual contains expected. If not then thrown.

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.

Registers a benchmark as a candidate for the runBenchmarks executor.

Forcefully throws a failed assertion

Given a list of globs or URLs to include and exclude and a root directory from which to expand relative globs, yield a list of URLs (file: or remote) that should be imported for the test runner.

Returns a presentation string of your val object

Runs all registered and non-skipped benchmarks serially.

Runs specified benchmarks if the enclosing script is main.

Import the specified test modules and run their tests as a suite.

Runs specified test cases. Parallel execution can be enabled via the boolean option; default: serial.

Use this to stub out methods that will throw when invoked.

Use this to assert unreachable code.

Interfaces

Defines a benchmark definition with configurable runs.

Defines a benchmark through a named function.

Defines runBenchmark's run constraints by matching benchmark names.

Provides methods for starting and stopping a benchmark clock.

Defines options for controlling execution details of a test suite.

Type Aliases

Copyright (c) Facebook, Inc. and its affiliates. All Rights Reserved.