What is the recommended way to assert async with RNTLv12? #1710
-
We can continue using the await waitFor(() =>
expect(screen.getByRole('progressbar')).toBeOnTheScreen(),
); or should we move to expect to await expect(await screen.findByRole('progressbar')).toBeOnTheScreen(); |
Beta Was this translation helpful? Give feedback.
Answered by
mdjastrzebski
Nov 25, 2024
Replies: 1 comment 1 reply
-
|
Beta Was this translation helpful? Give feedback.
1 reply
Answer selected by
lucianomlima
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
findBy*
are recommended overwaitFor
+getBy
. Generally they do the same thing, and are easier to write and read.