We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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/await-async-events
Yes
v6.2.0
v8.56.0
20.11.1
yarn 3.2.2
macOS Ventura 13.6.4
Ternary return of userEvent.type or userEvent.clear is reporting testing-library/await-async-queries, even though the query will get awaited
userEvent.type
userEvent.clear
async function changeEmailInput(value) { const emailInput = screen.getByRole('textbox', { name: 'Email' }); return value.length ? userEvent.type(emailInput, value) : userEvent.clear(emailInput); }
Promise returned from async event method type must be handled eslint testing-library/await-async-events Promise returned from async event method clear must be handled eslint testing-library/await-async-events
type
clear
No response
{ ..., plugins: [ ..., 'eslint-plugin-testing-library' ], rules: { ..., 'testing-library/await-async-queries': ['error', { eventModule: 'userEvent' }] } } ### Rule(s) affected testing-library/await-async-queries ### Anything else? _No response_ ### Do you want to submit a pull request to fix this bug? No
The text was updated successfully, but these errors were encountered:
🎉 This issue has been resolved in version 6.2.1 🎉
The release is available on:
Your semantic-release bot 📦🚀
Sorry, something went wrong.
Successfully merging a pull request may close this issue.
Have you read the Troubleshooting section?
Yes
Plugin version
v6.2.0
ESLint version
v8.56.0
Node.js version
20.11.1
package manager and version
yarn 3.2.2
Operating system
macOS Ventura 13.6.4
Bug description
Ternary return of
userEvent.type
oruserEvent.clear
is reporting testing-library/await-async-queries, even though the query will get awaitedSteps to reproduce
Error output/screenshots
No response
ESLint configuration
The text was updated successfully, but these errors were encountered: