Options
All
  • Public
  • Public/Protected
  • All
Menu

Class TestCompletion

This object provides callback-ability for the end of a test suite, the completion succeeds when all tests pass otherwise it fails.

Hierarchy

Index

Methods

await

  • await(): void
  • await(timeoutMillis: number): void
  • Cause the current thread to wait until this completion completes.

    If the current thread is interrupted, an exception will be thrown.

    Returns void

  • Cause the current thread to wait until this completion completes with a configurable timeout.

    If completion times out or the current thread is interrupted, an exception will be thrown.

    Parameters

    • timeoutMillis: number

    Returns void

awaitSuccess

  • awaitSuccess(): void
  • awaitSuccess(timeoutMillis: number): void
  • Cause the current thread to wait until this completion completes and succeeds.

    If the current thread is interrupted or the suite fails, an exception will be thrown.

    Returns void

  • Cause the current thread to wait until this completion completes and succeeds with a configurable timeout.

    If completion times out or the current thread is interrupted or the suite fails, an exception will be thrown.

    Parameters

    • timeoutMillis: number

    Returns void

handler

  • handler(): PromiseLike<void>
  • handler(completionHandler: ((res: AsyncResult<void>) => void) | Handler<AsyncResult<void>>): void
  • Completion handler to receive a completion signal when this completions completes.

    Returns PromiseLike<void>

  • Completion handler to receive a completion signal when this completions completes.

    Parameters

    • completionHandler: ((res: AsyncResult<void>) => void) | Handler<AsyncResult<void>>

    Returns void

isCompleted

  • isCompleted(): boolean
  • Returns boolean

isFailed

  • isFailed(): boolean
  • Returns boolean

isSucceeded

  • isSucceeded(): boolean
  • Returns boolean

resolve

  • resolve(future: Promise<void>): void
  • Completes the future upon completion, otherwise fails it.

    Parameters

    • future: Promise<void>

    Returns void

Generated using TypeDoc