-
Notifications
You must be signed in to change notification settings - Fork 33
chore: simplify implementation of act #289
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
Conversation
There was a problem hiding this 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
LGTM! Ever so slightly different behavior if
fnis synchronous, but I don't think that really matters given we'll always get a Promise back fromtick
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).
c4bc42f to
f5121e1
Compare
@mcous Your #288 made me look at the implementation of
act(), and I think it can be simplified as per this PR.