userEvent.click vs fireEvent.click

  • for example: fire a click event on a button

    • fireEvent: the button will not be focused
    • userEvent: the button will be focused
  • userEvent can be better to reflect the user real behavior;

  • behind the scenes, userEvent calls to the fireEvent;