Closed
Description
Since we are checking testing library queries when calling queries member expressions for await-async-query
and no-await-sync-query
, we are getting some false positives in some cases:
- when using queries in cypress files
- when using methods with the same name in other places (e.g.
findByTestId
in enzyme tests in a codebase mixing both enzyme and testing library)
The main issue here is that we are checking the queries methods in every single file no matter where the method is coming from, but we should only check those imported from testing library or returned by something imported from testing library. However, I think a first approach could be at least check if testing library is imported in the file to check the methods or not.