Mock job worker for testing process flows. Provides easy configuration for different job completion scenarios.

Constructors

Methods

  • Configures the worker to do nothing (jobs will timeout).

    Returns Promise<void>

  • Configures the worker to complete a job successfully with the given variables.

    Type Parameters

    • T = Record<string, unknown>

    Parameters

    • Optionalvariables: T

    Returns Promise<void>

  • Configures the worker to throw a BPMN error with the given error code.

    Parameters

    • errorCode: string
    • OptionalerrorMessage: string

    Returns Promise<void>

  • Configures the worker to fail a job with the given error message.

    Parameters

    • errorMessage: string
    • retries: number = 0

    Returns Promise<void>