Testing · Middle · Question 1 of 75

What is the difference between findBy… and waitFor?

Explanation

findByRole(...) is literally waitFor(() => getByRole(...)). Use findBy to wait for an element and waitFor for other assertions.

Further reading

Problem with a question

Testing · Middle · question 1

Test yourself

Take the Testing · Middle quiz: questions and options are shuffled, and you get a review of your mistakes at the end.

Take this quiz