Difference between fireEvent.dblClick & fireEvent.doubleClick in testing library?

549 views Asked by At

Question about 2 different methods exposed via fireEvent API in the react-testing-library.

  • fireEvent.dblClick
  • fireEvent.doubleClick

What's the difference? And is there a recommendation to use one over the other?

1

There are 1 answers

0
hackape On BEST ANSWER

There's zero difference.

The Web platform natively has only "dblclick" event. Given that "doubleClick" is such a commonly mistaken event name, testing-library just makes it an alias of "dblClick".

Source