core3-utils

@wixc3/testing on Github

Home > @wixc3/testing > allWithTimeout

allWithTimeout() function

Limits the time a list of promises can take

Signature:

export declare function allWithTimeout<T extends Readonly<any[]>>(...actions: T): PromiseWithTimeout<_PromiseAll<T>>;

Parameters

Parameter Type Description
actions T

Returns:

PromiseWithTimeout<_PromiseAll<T>>

Example

await allWithTimeout(sleep(1000), sleep(99)).description('will time out').timeout(10)