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

feat(no-await-sync-events): add eventModules option #569

Merged
merged 4 commits into from
Apr 11, 2022

Conversation

Belco90
Copy link
Member

@Belco90 Belco90 commented Apr 11, 2022

Checks

  • I have read the contributing guidelines.
  • If some rule is added/updated/removed, I've regenerated the rules list.
  • If some rule meta info is changed, I've regenerated the plugin shared configs.

Changes

  • Adding eventModules option to be able to disable reporting "fire-event" or "user-event"

Context

Closes #567

@Belco90 Belco90 self-assigned this Apr 11, 2022
@Belco90 Belco90 changed the title 567 no await sync events option for events feat(no-await-sync-events): add eventModules option Apr 11, 2022
Copy link
Member

@timdeschryver timdeschryver left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This LGTM (if the test cases are passing).

Does this also take the setup into account?
Because with v14, it isn't recommended to directly use userEvents from the imported object, but you should rather create your own userEvent instance.

https://testing-library.com/docs/user-event/setup#starting-a-session-per-setup

@Belco90
Copy link
Member Author

Belco90 commented Apr 11, 2022

Does this also take the setup into account?
Because with v14, it isn't recommended to directly use userEvents from the imported object, but you should rather create your own userEvent instance.

https://testing-library.com/docs/user-event/setup#starting-a-session-per-setup

That's a good point. It's not addressed in this PR, but we should update all the internal detection helpers to consider this new way of setting up the user-event module.

Copy link
Member

@timdeschryver timdeschryver left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@Belco90 Belco90 merged commit 88f6735 into main Apr 11, 2022
@Belco90 Belco90 deleted the 567_no-await-sync-events_option_for_events branch April 11, 2022 18:29
@github-actions
Copy link

🎉 This PR is included in version 5.3.0 🎉

The release is available on:

Your semantic-release bot 📦🚀

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

Successfully merging this pull request may close these issues.

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