Static
delayStatic
randomCIDStatic
randomStatic
waitfunction that returns a boolean. predicate function will be called multiple times, until either it returns true or the timeout passes.
time limit for how long the predicate has to return true.
Optional
errMsgGenerator: string | (() => string)customization for the message text in the thrown Error on timeout. Can be a single string, or a function that is called to generate a string, which can be useful when used with a closure over state in the test so that the error message can include additional information about current state.
Wait up to 'timeoutMs' for the given predicate to return true. Polls the given predicate once every 100ms (plus however long it takes for the predicate itself to execute). Throws an Error if the predicate does not become true within the timeout. The error message in the thrown Error can be customized with the 'errMsgGenerator' arg.