Skip to content

Conversation

zone117x
Copy link
Contributor

Adds the option to reject a waiter instance. Example usage:

    const myWaiter = waiter();
    myWaiter.reject(new Error('failed'));
    await expect(myWaiter).rejects.toThrow(error);
    expect(myWaiter.isRejected).toBe(true);
    expect(myWaiter.isResolved).toBe(false);

@zone117x zone117x requested a review from rafaelcr March 24, 2025 10:38
@zone117x zone117x merged commit 8c56e1a into master Mar 25, 2025
4 checks passed
@zone117x zone117x deleted the feat/waiter-reject branch March 25, 2025 03:41
blockstack-devops pushed a commit that referenced this pull request Mar 25, 2025
## [1.8.0](v1.7.5...v1.8.0) (2025-03-25)

### Features

* add `reject` function to `waiter` ([#38](#38)) ([8c56e1a](8c56e1a))
@blockstack-devops
Copy link

🎉 This PR is included in version 1.8.0 🎉

The release is available on:

Your semantic-release bot 📦🚀

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants