-
Notifications
You must be signed in to change notification settings - Fork 143
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
testing-library/prefer-screen-queries with self-written helpers #340
Comments
Hello @pustovalov. Did you check the migration guide to v4? That error is reported by You are still able to switch the rule off if you are not interested in it tough. |
My bad, I think I misunderstood the actual issue. You are getting a non-related Testing Library method reported as a Testing Library query right? Can you confirm if your If it's not a custom query but something completely unrelated to Testing Library, Aggressive Reporting is causing that but there is no option to switch it off for queries yet. It should be available in the following days. |
I have used this rule before and there were no errors this is not custom query, it's just a function which uses
|
Thanks for sharing! That function is understood by the plugin as a custom query, which is fine! So you can get the advantage of other rules linting that function, like However, it doesn't make sense to get We'll get back when it's fixed 🚀 |
* fix(prefer-screen-queries): avoid reporting custom queries * docs(prefer-screen-queries): update examples, exceptions and reading Closes #340
🎉 This issue has been resolved in version 4.0.2 🎉 The release is available on: Your semantic-release bot 📦🚀 |
@Belco90 Thx, new version works fine |
Hey
eslint-plugin-testing-library@3.10.2
- no errorseslint-plugin-testing-library@4.0.1
- Avoid destructuring queries fromrender
result, usescreen.findByComplexText
instead testing-library/prefer-screen-queriesshould this rule only apply to
testing-library
methods?The text was updated successfully, but these errors were encountered: