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 | TemporaliteConfig

Configuration for spawning an ephemeral Temporal server.

Both the time-skipping test server and temporalite 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 createLocal

Type declaration

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

TestWorkflowEnvironmentOptionsWithDefaults

Ƭ TestWorkflowEnvironmentOptionsWithDefaults: Required<TestWorkflowEnvironmentOptions>


TimeSkippingTestWorkflowEnvironmentOptions

Ƭ TimeSkippingTestWorkflowEnvironmentOptions: Object

Options for 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.