A promise that transports the value of the resolver.
An error if the condition is not fulfilled within the specified timeout.
import { waitFor } from "test-utils/waitFor";
const result = await waitFor(() => {
const value = getValue();
if (value === undefined) {
throw new Error("Value not ready");
}
return value;
});
assert.equal(result, "myValue");
Generated using TypeDoc
Waits for a resolver to return a value. Continues checking until
resolverdoes not throw an error.