bupkis
    Preparing search index...

    Interface ExpectAsyncProps<AsyncAssertions, SyncAssertions>

    Properties available on asynchronous expect functions.

    This interface defines the additional properties and methods that are attached to async expect functions, extending the base expect functionality with async-specific features. These properties provide access to the underlying assertions and enable function composition through the use method.

    const expectAsync: ExpectAsync<MyAsyncAssertions> =
    createExpectAsyncFunction(assertions);

    // Access the underlying assertions
    console.log(expectAsync.assertions.length);

    // Compose with additional assertions
    const { expectAsync: enhanced } = expectAsync.use(moreAssertions);

    Type Parameters

    • AsyncAssertions extends AnyAsyncAssertions

      Array of async assertion objects available to this expect function

    • SyncAssertions extends AnySyncAssertions

      Array of sync assertion objects available for composition via use

    Hierarchy (View Summary)

    Index

    Properties

    assertions: AsyncAssertions

    Tuple of all assertions available in this expect().

    The type of a use() function.

    createAssertion: CreateAssertionFn

    Creates a new synchronous assertion.

    createAsyncAssertion: CreateAsyncAssertionFn

    Creates a new asynchronous assertion.

    fail: FailFn

    Fails immediately with optional reason.

    Reason for failure