Skip to content

Latest commit

 

History

History
29 lines (19 loc) · 669 Bytes

File metadata and controls

29 lines (19 loc) · 669 Bytes

Enforces usage of userEvent over fireEvent in tests (@bam.tech/prefer-user-event)

🔧 This rule is automatically fixable by the --fix CLI option.

Enforces the usage of userEvent.type over fireEvent.changeText and userEvent.press over fireEvent.press

Rule details

Examples of incorrect code for this rule:

fireEvent.press(button);
fireEvent.changeText(input, "text");

Examples of correct code for this rule:

await userEvent.press(button);
await userEvent.type(input, "text");