Interface Script
interface Script {
ensureAllScripted(): Script;
run(executor?: LocalExecutor): Promise<ScriptedRun>;
step(name: string): NamedStep;
}
ensureAllScripted(): Script;
run(executor?: LocalExecutor): Promise<ScriptedRun>;
step(name: string): NamedStep;
}
Methods
ensure All Scripted
-
Asks that every step of the workflow be scripted, checked by
run.Returns Script
run
-
Runs the journey on
executor, a new LocalExecutor unless one is given, playing the script, and resolves to the scripted run: the journey's result and the record of every step.Parameters
Optionalexecutor: LocalExecutor
Returns Promise<ScriptedRun>
Throws
TestMistake, as a rejection, before the journey and any event, listing everything the script leaves out: for each scripted step, the first attempt it can have that is not described, and its rescue step, when it can fail on attempt 1 and the rescue step is not scripted, and, when every step was asked for, each step not scripted.
step
-
Starts describing the step, or the rescue step, named
name.Parameters
- name: string
Returns NamedStep
A scripted run before it names a step: it names steps, asks for every step to be scripted, or runs.