Interface AttemptSettingGlobalMetadata
interface AttemptSettingGlobalMetadata {
willFail(reason: string | Reason): StepScript;
willSetGlobalMetadata<T>(
key: string,
value: T & AsValue<T>,
): AttemptSettingGlobalMetadata;
willSkip(): StepScript;
willSkipBecause(reason: string | Reason): StepScript;
willSucceed(): StepScript;
willTerminateAbnormally(errorMessage: string): StepScript;
}
willFail(reason: string | Reason): StepScript;
willSetGlobalMetadata<T>(
key: string,
value: T & AsValue<T>,
): AttemptSettingGlobalMetadata;
willSkip(): StepScript;
willSkipBecause(reason: string | Reason): StepScript;
willSucceed(): StepScript;
willTerminateAbnormally(errorMessage: string): StepScript;
}
Hierarchy (View Summary)
- AttemptEndings
- AttemptSettingGlobalMetadata
Methods
will Fail
-
The attempts fail, for
reason, or a reason with only this code.Parameters
- reason: string | Reason
Returns StepScript
will Set Global Metadata
-
The attempts set the global metadata
keytovalue, as the step's reporter would.Type Parameters
- T
Returns AttemptSettingGlobalMetadata
will Skip
-
The step skips itself, giving no reason.
Returns StepScript
will Skip Because
-
The step skips itself, for
reason, or a reason with only this code.Parameters
- reason: string | Reason
Returns StepScript
will Succeed
-
The attempts succeed.
Returns StepScript
will Terminate Abnormally
-
The attempts terminate abnormally, with an error carrying
errorMessage.Parameters
- errorMessage: string
Returns StepScript
The attempts chosen set global metadata, then end.