Skip to main content

Namespace: testing

npm i @temporalio/testing

Testing library for the SDK.

Documentation

Classes

Interfaces

Type Aliases

TestServerSpawner

Ƭ TestServerSpawner: (port: number) => ChildProcess

Type declaration

▸ (port): ChildProcess

A generic callback that returns a child process

Parameters
NameType
portnumber
Returns

ChildProcess


WorkflowStartOptions

Ƭ WorkflowStartOptions<T>: WorkflowStartOptions<T> & { runInNormalTime?: boolean }

Options passed to execute, these are the same as the BaseWorkflowStartOptions with an additional option that controls whether to toggle time skipping in the Test server while waiting on a Workflow's result.

Type parameters

NameType
Textends Workflow

Variables

DEFAULT_TEST_SERVER_PATH

Const DEFAULT_TEST_SERVER_PATH: string


defaultActivityInfo

Const defaultActivityInfo: Info

Used as the default activity info for Activities executed in the MockActivityEnvironment


workflowInterceptorModules

Const workflowInterceptorModules: string[]

Convenience workflow interceptors

Contains a single interceptor for transforming AssertionErrors into non retryable ApplicationFailures.