Skip to content
New issue

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

await-async-events doesn't seem to check calls from user sessions returned by userEvent.setup() #812

Open
julienw opened this issue Sep 4, 2023 · 4 comments · May be fixed by #830
Open
Labels
enhancement New feature or request

Comments

@julienw
Copy link
Contributor

julienw commented Sep 4, 2023

What rule do you want to change?

await-async-events

Does this change cause the rule to produce more or fewer warnings?

More warnings

How will the change be implemented?

The code needs to detect calls to userEvent.setup() and calls to the resulting object's methods.

Example code

import userEvent from '@testing-library/user-event';
const user = userEvent.setup();
user.click(domElement);

How does the current rule affect the code?

user.click() and others returns a Promise and should be awaited.

How will the new rule affect the code?

import userEvent from '@testing-library/user-event';
const user = userEvent.setup();
await user.click(domElement);

Anything else?

see also #800

Do you want to submit a pull request to change the rule?

No

@julienw julienw added enhancement New feature or request triage Pending to be triaged by a maintainer labels Sep 4, 2023
@Belco90 Belco90 removed the triage Pending to be triaged by a maintainer label Sep 4, 2023
@Kvanttinen
Copy link

Kvanttinen commented Oct 13, 2023

Any estimate for this? We're about to start using this package in our project and this is a blocker for us.

I'm using @testing-library/user-event 14.5.1 and eslint-plugin-testing-library 6.1.0.

@Belco90
Copy link
Member

Belco90 commented Oct 13, 2023

There is no ETA for this. PRs are more than welcome 🙂.

@Kvanttinen
Copy link

Ok, I was already looking for a solution for that yesterday, I'll see if I can come up with something.

@gerardo-rodriguez
Copy link

I'd love to see this as well. Are there any more recent updates on this? Thanks, everyone! 😄

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
4 participants