-
Notifications
You must be signed in to change notification settings - Fork 44
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: .toBeVisible error with Pressable function style #134
fix: .toBeVisible error with Pressable function style #134
Conversation
Codecov Report
@@ Coverage Diff @@
## main #134 +/- ##
=========================================
Coverage 100.00% 100.00%
=========================================
Files 11 12 +1
Lines 208 224 +16
Branches 66 70 +4
=========================================
+ Hits 208 224 +16
Flags with carried forward coverage won't be shown. Click here to find out more.
📣 We’re building smart automated test selection to slash your CI/CD build times. Learn more |
@kaibarnes I've modified the implementation to match RNTL approach, i.e. performing tree walking only using host elements. This should fix the problem. |
@mdjastrzebski Thanks. I confirmed locally that it seems to be working as expected now |
🎉 This PR is included in version 5.3.1 🎉 The release is available on: Your semantic-release bot 📦🚀 |
What:
Fixes #133
To fix an error when
.toBeVisible
is used on a Pressable using a function for thestyle
propWhy:
Using a function is a documented use case (doc) and so it should be supported.
How:
By adding a check if the style prop is a function and calling it with
{ pressed: false }
as a default value.Checklist: