Skip to content

testing-library/no-await-sync-events reporting false positives for @testing-library/user-event v14 #567

Closed
@swissspidy

Description

@swissspidy

Plugin version

5.0.5

ESLint version

8.12.0

Node.js version

16.4.2

npm/yarn version

8.5.0

Operating system

macOS Monterey, 12.3

Bug description

In version 14, @testing-library/user-event changed all APIs to always return a Promise.

See https://github.com/testing-library/user-event/releases/tag/v14.0.0

Steps to reproduce

Use the async APIs in @testing-library/user-event v14 and see all the false positives reported by this rule

Error output/screenshots

error  `userEvent.click` is sync and does not need `await` operator  testing-library/no-await-sync-events

ESLint configuration

{
"testing-library/no-await-sync-events": "error",
}

Rule(s) affected

testing-library/no-await-sync-events

Anything else?

No response

Do you want to submit a pull request to fix this bug?

No

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