Testing · Junior · Question 46 of 78
What is the difference between getBy, queryBy and findBy?
- ✓Correct answer:
getBythrows if nothing is found,queryByreturnsnull,findByreturns a promise and waits for the element - 2They differ only in speed
- 3
getByfinds one element,queryByall elements,findBythe first one
Explanation
Each also has an All version (getAllBy, …) that returns an array.