Class: TestRunHandle<Out>
A handle to a run of the test environment.
Type Parameters
Out
Out = Json
Constructors
Constructor
new TestRunHandle<
Out>(env,runId):TestRunHandle<Out>
Parameters
env
runId
string
Returns
TestRunHandle<Out>
Properties
runId
readonlyrunId:string
Methods
cancel()
cancel(
reason?):Promise<void>
Request cancellation and run until idle (without skipping time).
Parameters
reason?
string
Returns
Promise<void>
history()
history():
RunEventRecord[]
The run's history so far.
Returns
historyFile()
historyFile(
extra?):HistoryFile
The history as a history file.
Parameters
extra?
Partial<Omit<HistoryFile, "format" | "formatVersion" | "workflowFn" | "events">>
Returns
query()
query<
Result,Args>(query,args?):Promise<Result>
Answer a query from the run's history (custom queries and the built-ins).
Type Parameters
Result
Result
Args
Args
Parameters
query
string | QueryDefinition<Result, Args>
args?
Args
Returns
Promise<Result>
reset()
reset(
options?):Promise<TestRunHandle<Out>>
Reset the run (11 §2.7): a new run forked at a completed task; this one is terminated.
Parameters
options?
Returns
Promise<TestRunHandle<Out>>
result()
result():
Promise<Out>
Run until this run (or the last run of its continue-as-new chain) ends; its output.
Returns
Promise<Out>
signal()
signal<
P>(signal,payload?):Promise<void>
Deliver a signal and run until idle (without skipping time).
Type Parameters
P
P
Parameters
signal
string | SignalDefinition<P>
payload?
P
Returns
Promise<void>
sinkCalls()
sinkCalls():
SinkCall[]
Sink calls the run's tasks made.
Returns
SinkCall[]
state()
state():
RunState
The projected state of the run.
Returns
terminate()
terminate(
reason?):Promise<void>
Terminate the run without running code.
Parameters
reason?
string
Returns
Promise<void>
update()
update<
Args,Result>(update,args?,options?):Promise<UpdateResult>
Send an update and run until idle.
Type Parameters
Args
Args
Result
Result
Parameters
update
string | UpdateDefinition<Args, Result>
args?
Args
options?
Returns
Promise<UpdateResult>