Function expectSequence

  • This function is a testing utility. It takes an observable and array of values. The returned Promise resolves as soon as the number of observed values equals the array-length AND the observed values equal the array-values (using expect with .toEqual). It rejects in all other cases, e.g. if the expected number of values was not observed within the configurable timeout.

    Returns

    Type Parameters

    • T

      type for the values to be observed

    Parameters

    • observable: Observable<T>

      the observable.

    • sequence: T[]

      the expected values.

    • timeoutAfter: number = 3000

      the timeout for waiting on the expected values. Defaults to 3000ms

    Returns Promise<void>

Generated using TypeDoc