React Testing Library · Function
waitFor
Use findBy... to wait for one element to appear. Use waitFor for a condition that must become true, and waitForElementToBeRemoved when existing elements should disappear.
Last updated
Syntax
findBy...(query, queryOptions?, waitForOptions?)
waitFor(callback, options?)
waitForElementToBeRemoved(callbackOrElement, options?)In-depth API docs are only for subscribers: parameters, examples, common mistakes and interview practice.
SubscribeRelated
getBy...queryBy...findAllBy...waitForwaitForElementToBeRemovedMutationObserver