test

var test: Any?(source)

This function is used to create subtests under the current test. This function behaves in the same fashion as the top level {@link test} function.

Since

v18.0.0

Parameters

name

The name of the test, which is displayed when reporting test results. Defaults to the name property of fn, or '<anonymous>' if fn does not have a name.

options

Configuration options for the test.

fn

The function under test. This first argument to this function is a {@link TestContext} object. If the test uses callbacks, the callback function is passed as the second argument.