namespace test

Additional properties on the test function.

Functions

f
test.eachTest<T>(
testName: string,
dataset: EachData<T>,
callback: EachCallback<Assert, T>
): void

Defines one test per case of dataset, each receiving its case as data. Equivalent to QUnit.test.each, and names the cases as it does: name [value] for a short string, name [index: value] for other primitives, name [index] otherwise, and name [key] for an object dataset.

Variables

v
test.only: OnlyTest<Assert>

Runs only this test, and any other only test or module: every other test is skipped. Equivalent to QUnit.test.only, and to passing { only: true }. Deno runs only these, and then fails the run on purpose, so that an only is not committed by accident.

v
test.skip: SkipTest

Registers a skipped test. Equivalent to QUnit.test.skip. The test body is never executed; the test is reported as ignored by Deno's runner.

v
test.todo: TodoTest<Assert>

Registers a todo test. Equivalent to QUnit.test.todo. The test body is never executed; the test is reported as ignored by Deno's runner (Deno has no native todo concept).

Usage

import { test } from ".";