Options
All
  • Public
  • Public/Protected
  • All
Menu

Module @tmorin/ceb-messaging-testing

Index

Type aliases

Functions

Type aliases

WaitEventsOptions

WaitEventsOptions: { occurrences: number; timeout: number }

The options of waitForEvents.

Type declaration

  • occurrences: number

    The number of expected occurrences.

    default

    1

  • timeout: number

    The maximum number of milliseconds to wait for.

    default

    500

Functions

waitForEvents

  • waitForEvents<E>(gateway: Gateway<EventBus, CommandBus, QueryBus, ObservableGateway>, eventType: string, options?: Partial<WaitEventsOptions>): Promise<E[]>
  • Wait for events matching a specific type.

    Type parameters

    • E: Event<any, MessageHeaders, E> = Event<any, MessageHeaders>

    Parameters

    • gateway: Gateway<EventBus, CommandBus, QueryBus, ObservableGateway>

      the gateway

    • eventType: string

      the type of the event

    • options: Partial<WaitEventsOptions> = {}

      the options

    Returns Promise<E[]>

Generated using TypeDoc