testing-library / eslint-plugin-testing-library

ESLint plugin to follow best practices and anticipate common mistakes when writing tests with Testing Library
https://npm.im/eslint-plugin-testing-library
MIT License
982 stars 137 forks source link

feat(await-async-events): instance of userEvent is recognized as async #830

Open Kvanttinen opened 11 months ago

Kvanttinen commented 11 months ago

Checks

Changes

Adds a feature that events from the instance of userEvent are recognized as async events.

Example: const user = userEvent.setup(); user.click(button);

The 'user' will be flagged in this case.

Context

Closes #812

My first open source PR, and not used to GitHub that much, so there might be some errors with the process. Changes itself are quite simple, but I didn't find a more elegant way to do that.

ka2jun8 commented 9 months ago

any updates?

Belco90 commented 8 months ago

@ka2jun8 Sorry for the late response! I'll review this soon.

Belco90 commented 8 months ago

I gave it a first round. After the changes requested are applied, I'll give it another round.

ttbui11 commented 1 month ago

any updates on this please?