Skip to content

How did userEvent work before v14 and the #setup method? #962

Answered by ph-fritsche
stephenpassero asked this question in Q&A
Discussion options

You must be logged in to vote

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…

Replies: 1 comment 1 reply

Comment options

You must be logged in to vote
1 reply
@stephenpassero
Comment options

Answer selected by stephenpassero
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants