-
Notifications
You must be signed in to change notification settings - Fork 1.1k
fix: console.error doesn't have to be a string in act.compat.js #476
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
fix: console.error doesn't have to be a string in act.compat.js #476
Conversation
I'm happy to merge either of these once they pass the build and all the current tests :) |
actually found out that the Added a test for this, coverage should be 100% again |
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.
Excellent. Thank you!
@all-contributors please add @rvdkooy for code and tests |
I've put up a pull request to add @rvdkooy! 🎉 |
🎉 This PR is included in version 9.1.4 🎉 The release is available on:
Your semantic-release bot 📦🚀 |
prevents asyncAct throwing an error if the item being logged isn't a string. Coped mostly from testing-library/react-testing-library#476
prevents asyncAct throwing an error if the item being logged isn't a string. Coped mostly from testing-library/react-testing-library#476
What:
This PR fixes issue: #442 by adding type checking for args used in asyncAct function.
Why:
Current implementation assumes console.erorr was always called with a string even though it could be called with other types.
How:
Wrapped execution of code in a type check if statement to ensure operations are done only on string types.
Checklist: