-
Notifications
You must be signed in to change notification settings - Fork 252
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merge into testing libraries and recommend over fireEvent #183
Comments
Agreed, user-level abstractions are key to testing-library |
To be honest, the way user-event handles the events is how I expected testing-library to handle them the first time I use it. I think this is a good idea. |
I think the end goal of this project is to be included in the testing libraries. For now, I don't think it's mature enough to replace |
This is definitely an eventual goal, but I feel like we're a long way from that goal. There's a lot of work to be done and I'm afraid that I've just about used up my bandwidth on this project. If anyone else would like to step in and manage the project from here they're more than welcome. |
I'd be happy to help out, but the three issues I originally mentioned have already been fixed, and I'm not sure what else we need at this point. Are there any specific issues, broad goals, or non-functional requirements you'd like us to meet before this is merged? |
All of the existing issues are a good start :) And I just keep getting this feeling that this package really doesn't quite deliver on what it promises 😬 |
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
The main blocker currently is getting async events implemented in a way that fixes this issue. |
Honestly, I would be against this. From my experience at work, user-event is incredibly unreliable (almost every update either fixes or breaks something). fireEvent is much more barebones, but it's solid. Having the option to use both would be ideal IMO! EDIT: After further investigation, I believe the problem is material-ui being unreliable in testing environments rather than user-event. |
Happy to hear your issues out and how you determined that the issue is with one library and not the one. We' re using testing-library internally and I can't recall having to refactor tests since we switched. Though we shouldn't replace And user-event is still polyfilling some shortcomings of older JSDOM versions (e.g. Adding it is fine, but not replacing. These tools are not equivalent. |
As far as I remember @kentcdodds' plan a few months ago was to add We'd still need to at least keep
Should we automatically detect the JSDOM version and only apply fixes in broken versions? Alternatively we can set up deprecation policies for older versions of JSDOM (which should probably be based off popular tools like |
Any further discussion about merging this into |
Now that this package is mentioned in the testing library docs, it would be nice to expand it enough to be recommended over
fireEvent
in most cases and include it in the original packages. We should think about what common user interactions are missing that are tricky to implement withfireEvent
. Other testing tools like Cypress could be good inspiration.The text was updated successfully, but these errors were encountered: