Skip to main content

Namespace: testing

npm i @temporalio/testing

Testing library for the SDK.

Documentation

Classes

Interfaces

Type Aliases

ClientOptionsForTestEnv

Ƭ ClientOptionsForTestEnv: Omit<ClientOptions, "namespace" | "connection">

Subset of the "normal" client options that are used to create a client for the test environment.


EphemeralServerConfig

Ƭ EphemeralServerConfig: TimeSkippingServerConfig | DevServerConfig

Configuration for spawning an ephemeral Temporal server.

Both the time-skipping Test Server and Temporal CLI dev server are supported.


EphemeralServerExecutable

Ƭ EphemeralServerExecutable: { downloadDir?: string ; type: "cached-download" ; version?: string } | { path: string ; type: "existing-path" }

Which version of the executable to run.


LocalTestWorkflowEnvironmentOptions

Ƭ LocalTestWorkflowEnvironmentOptions: Object

Options for TestWorkflowEnvironment.createLocal

Type declaration

NameType
client?ClientOptionsForTestEnv
server?Omit<DevServerConfig, "type">

TestWorkflowEnvironmentOptions

Ƭ TestWorkflowEnvironmentOptions: Object

Options for TestWorkflowEnvironment.create

Type declaration

NameType
client?ClientOptionsForTestEnv
serverEphemeralServerConfig

TestWorkflowEnvironmentOptionsWithDefaults

Ƭ TestWorkflowEnvironmentOptionsWithDefaults: Required<TestWorkflowEnvironmentOptions>


TimeSkippingTestWorkflowEnvironmentOptions

Ƭ TimeSkippingTestWorkflowEnvironmentOptions: Object

Options for TestWorkflowEnvironment.createTimeSkipping

Type declaration

NameType
client?ClientOptionsForTestEnv
server?Omit<TimeSkippingServerConfig, "type">

Variables

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.