Node TAP
    Preparing search index...

    Class Waiter

    Basically a fancy Deferred, wrapped around an existing promise, used by the @tapjs/core!test-base.TestBase#waitOn method, and tracked in the @tapjs/core!test-base.TestBase#queue.

    The callback function is called when it's been either resolved or rejected. The Waiter internal promise is resolved if the wrapped promise matches our expectation. The value member is the resolved value or rejection error.

    Index
    • Parameters

      • promise: Promise<any>
      • cb: (w: Waiter) => any
      • expectReject: boolean = false

      Returns Waiter

    cb: ((w: Waiter) => any) | null

    Callback to call when the promise resolves, or null if not provided

    done: boolean = false

    Set when the Waiter's promise has either resolved or rejected

    expectReject: boolean
    finishing: boolean = false
    promise: Promise<void>
    ready: boolean = false

    whether or not this waiter is ready to process

    rejected: boolean = false

    True if the promise rejected

    resolve: ((value?: any) => void) | null = null
    resolved: boolean = false

    True if the promise resolved successfully

    value: any = undefined

    The resolved value, or the error that was raised on rejection

    • Tell the waiter to abandon the promise and stop waiting. Called when tests time out or bail out.

      Parameters

      • er: Error

      Returns void