romgain / react-select-event

🦗 Simulate react-select events for react-testing-library
MIT License
210 stars 24 forks source link

Migrate to using @testing-library/user-event #175

Open artursvonda opened 1 year ago

artursvonda commented 1 year ago

The userEvent better represents actions taken by user/browser and actually allows us to get rid of some hacks.

Also, testing now with React v18.

And removed redundant act calls as well since, both, fireEvent and userEvent wrap calls in act implicitly (when required).

aroslaniec commented 1 year ago

Love to see this change as it also solves issue with act() wrapping fireEvent() in rse.clear() method that throws RTL warnings - your change seams to be working fine w/o that issue

kirkobyte commented 11 months ago

I've tested these changes locally on a large codebase I'm migrating to React 18 and can confirm it's fixed bugs which arose from the migration

chiptus commented 9 months ago

@romgain do you think this can be merged and published to npm?