Closed
Description
In addition to the method events like fireEvent.click
, it is also possible to create custom events objects and use fireEvent
as a function, as the documentation for fireEvent shows
// form 1
const myEvent = createEvent.click(node)
fireEvent(node, myEvent)
// form 2
fireEvent(
input,
createEvent('click', input)
)
The rule should recommend to use userEvent.click()
the rule should consider this form too
Note: This rule has been migrated in the v4
branch, so anyone taking this issue should do so starting from branch v4
(And targeting it as well)