Bun

namespace

test.suite

function suite(
name?: string,
options?: TestOptions,
fn?: SuiteFn
): Promise<void>;

The suite() function is imported from the node:test module.

@param name

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

@param options

Configuration options for the suite. This supports the same options as test.

@param fn

The suite function declaring nested tests and suites. The first argument to this function is a SuiteContext object.

@returns

Immediately fulfilled with undefined.

function suite(
name?: string,
fn?: SuiteFn
): Promise<void>;

The suite() function is imported from the node:test module.

@param name

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

@param fn

The suite function declaring nested tests and suites. The first argument to this function is a SuiteContext object.

@returns

Immediately fulfilled with undefined.

function suite(
options?: TestOptions,
fn?: SuiteFn
): Promise<void>;

The suite() function is imported from the node:test module.

@param options

Configuration options for the suite. This supports the same options as test.

@param fn

The suite function declaring nested tests and suites. The first argument to this function is a SuiteContext object.

@returns

Immediately fulfilled with undefined.

function suite(
fn?: SuiteFn
): Promise<void>;

The suite() function is imported from the node:test module.

@param fn

The suite function declaring nested tests and suites. The first argument to this function is a SuiteContext object.

@returns

Immediately fulfilled with undefined.

namespace suite

  • function only(
    name?: string,
    options?: TestOptions,
    fn?: SuiteFn
    ): Promise<void>;

    Shorthand for marking a suite as only. This is the same as calling suite with options.only set to true.

    function only(
    name?: string,
    fn?: SuiteFn
    ): Promise<void>;

    Shorthand for marking a suite as only. This is the same as calling suite with options.only set to true.

    function only(
    options?: TestOptions,
    fn?: SuiteFn
    ): Promise<void>;

    Shorthand for marking a suite as only. This is the same as calling suite with options.only set to true.

    function only(
    fn?: SuiteFn
    ): Promise<void>;

    Shorthand for marking a suite as only. This is the same as calling suite with options.only set to true.

  • function skip(
    name?: string,
    options?: TestOptions,
    fn?: SuiteFn
    ): Promise<void>;

    Shorthand for skipping a suite. This is the same as calling suite with options.skip set to true.

    function skip(
    name?: string,
    fn?: SuiteFn
    ): Promise<void>;

    Shorthand for skipping a suite. This is the same as calling suite with options.skip set to true.

    function skip(
    options?: TestOptions,
    fn?: SuiteFn
    ): Promise<void>;

    Shorthand for skipping a suite. This is the same as calling suite with options.skip set to true.

    function skip(
    fn?: SuiteFn
    ): Promise<void>;

    Shorthand for skipping a suite. This is the same as calling suite with options.skip set to true.

  • function todo(
    name?: string,
    options?: TestOptions,
    fn?: SuiteFn
    ): Promise<void>;

    Shorthand for marking a suite as TODO. This is the same as calling suite with options.todo set to true.

    function todo(
    name?: string,
    fn?: SuiteFn
    ): Promise<void>;

    Shorthand for marking a suite as TODO. This is the same as calling suite with options.todo set to true.

    function todo(
    options?: TestOptions,
    fn?: SuiteFn
    ): Promise<void>;

    Shorthand for marking a suite as TODO. This is the same as calling suite with options.todo set to true.

    function todo(
    fn?: SuiteFn
    ): Promise<void>;

    Shorthand for marking a suite as TODO. This is the same as calling suite with options.todo set to true.