Skip to content

Conversation

mcous
Copy link
Collaborator

@mcous mcous commented Jan 24, 2024

The implementation of act() requires a function, but the type annotation says it takes either a function or a Promise.

After checking out the history, I found this mismatch was created by #54, which added both the type annotation and implementation for act. This leads me to think the best path forward now is to simply adjust the type annotation to match reality, rather than updating the implementation to support a Promise.

Closes #134

@yanick
Copy link
Collaborator

yanick commented Jan 24, 2024

Sounds sane! 👍

@yanick yanick merged commit 9ef86c7 into testing-library:main Jan 24, 2024
Copy link

🎉 This PR is included in version 4.0.6 🎉

The release is available on:

Your semantic-release bot 📦🚀

@mcous mcous deleted the fix-134 branch January 24, 2024 19:40
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.

TypeScript definition of act() function allows Promise as a parameter, but code fails if Promise is provided
2 participants