core3-utils

@wixc3/testing on Github

Home > @wixc3/testing > step

step() function

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>;

Parameters

Parameter Type Description
action Promise<T> a promise that should be settled before the timeout

Returns:

PromiseStep<T>

Example

await step(somePromise).description('Add this to rejection message')