queryAllBy
queryAllBy is a function in the React Testing Library query API used to locate elements in the rendered output. It returns an array containing all elements that match the given query within a specified container. If no elements match, it returns an empty array instead of throwing an error. This non-throwing behavior distinguishes it from the getAllBy family.
As a counterpart to getAllBy, queryAllBy provides a safe way to discover multiple matches without risking an
The return value is always an array of elements, which makes it straightforward to perform assertions on
When to use it: choose queryAllBy when you want to retrieve every element that matches a query
---