forLoop<State>(initialStateFactory: (() => State | Promise<State>), testBeforeEach: ((a: State) => boolean | Promise<boolean>), afterEach: ((a: State) => State | Promise<State>), codeToExecute: ((a: State) => void | Promise<void>)): any
This utility function will do a for loop, synchronously if all the parts are synchronous,
and asynchronously otherwise.
This should help us to use the same code yet supporting both possible scenarios.
Returns
void | Promise
Type Parameters
State
Parameters
initialStateFactory: (() => State | Promise<State>)
This utility function will do a for loop, synchronously if all the parts are synchronous, and asynchronously otherwise. This should help us to use the same code yet supporting both possible scenarios.
Returns
void | Promise