How did userEvent
work before v14 and the #setup
method?
#962
-
I'm installing RTL on a new project, and saw that as of v14, there's this new This is all well and good, but how did Also kinda a sidenote question, why is everything |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 1 reply
-
Previously there wasn't one place for such abstraction but multiple places where workarounds were applied trying to match the browser behavior. As this is open source, you can always dig through the code (of the previous version). Some APIs were already async before and some new implementations required asynchronous internals. |
Beta Was this translation helpful? Give feedback.
Previously there wasn't one place for such abstraction but multiple places where workarounds were applied trying to match the browser behavior.
The need for a centralized abstraction of a UI layer is explained #714 and further detailed in #744 .
As this is open source, you can always dig through the code (of the previous version).
Some APIs were already async before and some new implementations required asynchronous internals.
Always returning a Promise simplifies how we handle those and allows us to change how we handle things internally without further breaking changes. It also eliminates problems with frameworks applying changes asynchronously. For more information see #504 and the lin…