Function expect

Inspect a value/object/function (wrapper for node:assert - requires NodeJS)

The actual value/object/function to inspect

Assertions applicable to the actual value/object/function

  • Inspect a parameterless function (wrapper for node:assert - requires NodeJS)

    Type Parameters

    • T

    Parameters

    • fn: () => T

      The parameterless function

    Returns CallbackAssertions<() => T>

    Assertions applicable to parameterless functions

  • Inspect a promise (wrapper for node:assert - requires NodeJS)

    Type Parameters

    • T extends Promise<unknown>

    Parameters

    • promise: T

      The promise to inspect

    Returns PromiseAssertions<T>

    Assertions applicable to promises

  • Inspect any values/object/function other than promises and parameterless functions (wrapper for node:assert - requires NodeJS)

    Type Parameters

    • T

    Parameters

    • actual: T

      The actual value/object/function to inspect

    Returns GeneralAssertions<T>

    Assertions applicable to the actual value