Skip to content

New rule: prefer-user-event #162

Closed
@timdeschryver

Description

@timdeschryver

When testing-library/dom-testing-library#616 gets merged, userEvent will be part of DOM testing library.

We could create rules for events on userEvent that are preferred over their fireEvent counterparts.

Before we start implementing rules, there are some thing we need to clarify first:

  • Kent already mentioned click would be a good candidate, are there any others that could benefit from this rule? I think hover, unhover could also be included in within this rule.

  • Should it be one rule for all events, or a rule per event? The latter would allow us to disable/enable specific events... but we could also create a config for it...

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions