Skip to content

feature request: no-await-fire-event #219

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

Closed
benmonro opened this issue Aug 19, 2020 · 4 comments
Closed

feature request: no-await-fire-event #219

benmonro opened this issue Aug 19, 2020 · 4 comments

Comments

@benmonro
Copy link
Member

We accidentally enabled await-fire-event in our react project and discovered that awaiting fireEvent can actually cause tests to be slow and flaky as a result (removing the await fixes it). so was thinking that an opposite rule or even a config option to the await-fire-event to work in opposite mode would be useful

@Belco90
Copy link
Member

Belco90 commented Aug 20, 2020

I guess this could be wrapped into a no-await-sync-utils to do the opposite than await-async-utils. I don't know if there are any other sync util than fireEvent that could be included there, but with this approach we can include any new sync util here. What do you think?

@benmonro
Copy link
Member Author

benmonro commented Aug 20, 2020

Works for me. My only thought would be that you wouldn't want the rules to conflict with each other for vue users but I'm not a vue user so that's not going to affect me. 🙂

@Belco90
Copy link
Member

Belco90 commented Aug 20, 2020

I haven't thought about that conflict. Maybe we need to create this rule with a config options for disabling specific methods to be check so Vue users can enable this rule but disabling fireEvent.

@benmonro
Copy link
Member Author

That would work.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants