Skip to content

False positives on await-async-query and no-await-sync-query #122

Closed
@Belco90

Description

@Belco90

Related to #120, #114

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.

Metadata

Metadata

Assignees

Labels

bugSomething isn't workingreleased

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions