You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
waitForElementToBeRemoved(()=>getByText(/not here/i)).catch(err=>console.log(err),)// Error: The element(s) given to waitForElementToBeRemoved are already removed. waitForElementToBeRemoved requires that the element(s) exist(s) before waiting for removal.
The documentation is contradicting itself already. It only says that it'll throw on null or empty arrays. But it doesn't say that () => null will throw. However, it later includes waitForElementToBeRemoved(() => getByText(/not here/i)) in the examples.
@testing-library/dom
version: 8.11.2Problem description:
There is currently no exception catching for the initial call inside
waitForElementToBeRemoved
. When that call ofcallback
throws, instead of getting the errorError('The element(s) given to waitForElementToBeRemoved are already removed...')
we will get the error thrown from the callback, even when it is aTestingLibraryElementError
. This contradicts the documented behavior:Suggested solution:
See #1094.
The text was updated successfully, but these errors were encountered: