Home > @wixc3/testing > step
Adds a step description to a promise if it’s rejected
* - Note: useable only within a mocha test/hook. The total test timeout will be adjusted to make sure the test will not time out waiting for this step
Signature:
export declare function step<T>(action: Promise<T>): PromiseStep<T>;
Parameter | Type | Description |
---|---|---|
action | Promise<T> | a promise that should be settled before the timeout |
Returns:
PromiseStep<T>
await step(somePromise).description('Add this to rejection message')