Skip to content

Allow waitUntil to accept a callback that returns a promise #1393

Open
@boris-petrov

Description

@boris-petrov

Right now, waitUntil expects that the callback returns a truthy/falsy value. It would be nice to allow the callback to return a promise which resolves to a truthy/falsy value. So something like to work (and return after 1 second not immediately like now because the returned promise is a truthy value):

await waitUntil(() => new Promise((resolve) => setTimeout(() => resolve(true), 1000)));

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions