Namespace: testing
npm i @temporalio/testing
Testing library for the SDK.
Classes
Interfaces
- DevServerConfig
- MockActivityEnvironmentOptions
- TestEnvClientOptions
- TimeSkippingServerConfig
- TimeSkippingWorkflowClientOptions
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
Name | Type |
---|---|
client? | ClientOptionsForTestEnv |
server? | Omit <DevServerConfig , "type" > |
TestWorkflowEnvironmentOptions
Ƭ TestWorkflowEnvironmentOptions: Object
Options for TestWorkflowEnvironment.create
Type declaration
Name | Type |
---|---|
client? | ClientOptionsForTestEnv |
server | EphemeralServerConfig |
TestWorkflowEnvironmentOptionsWithDefaults
Ƭ TestWorkflowEnvironmentOptionsWithDefaults: Required
<TestWorkflowEnvironmentOptions
>
TimeSkippingTestWorkflowEnvironmentOptions
Ƭ TimeSkippingTestWorkflowEnvironmentOptions: Object
Options for TestWorkflowEnvironment.createTimeSkipping
Type declaration
Name | Type |
---|---|
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 AssertionError
s into non
retryable ApplicationFailure
s.