Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore: simplify implementation of act #289

Merged
merged 1 commit into from
Jan 24, 2024
Merged

chore: simplify implementation of act #289

merged 1 commit into from
Jan 24, 2024

Conversation

yanick
Copy link
Collaborator

@yanick yanick commented Jan 24, 2024

@mcous Your #288 made me look at the implementation of act(), and I think it can be simplified as per this PR.

Copy link
Collaborator

@mcous mcous left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM! Ever so slightly different behavior if fn is synchronous, but I don't think that really matters given we'll always get a Promise back from tick

@yanick
Copy link
Collaborator Author

yanick commented Jan 24, 2024

LGTM! Ever so slightly different behavior if fn is synchronous, but I don't think that really matters given we'll always get a Promise back from tick

Yup, and even if fn is synchronous, await in await fn() will be a no-op (unless fn() is a synchronous function and does return a promise, but even then I think the behavior ends up being the same).

@yanick yanick merged commit 9fdce65 into main Jan 24, 2024
5 checks passed
Copy link

🎉 This PR is included in version 4.1.0 🎉

The release is available on:

Your semantic-release bot 📦🚀

@mcous mcous deleted the simplify-act branch June 2, 2024 17:35
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.

2 participants