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
test('movie title appears',async()=>{// element is initially not present...// wait for appearance inside an assertionawaitwaitFor(()=>{expect(getByText('the lion king')).toBeInTheDocument()})})
test('movie title no longer present in DOM', async () => {
// element is removed
await waitForElementToBeRemoved(() => queryByText('the mummy'))
})
Both of these examples are flagged by no-await-sync-query, and they probably shouldn't be.
The text was updated successfully, but these errors were encountered:
Hey @epmatsw, thank you very much for your feedback on v4! I think I got a similar issue to this one with no-await-sync-query, and I believe I know where the issue is located in the code.
In https://testing-library.com/docs/guide-disappearance, there's some techniques outlined for waiting for elements to be removed:
Both of these examples are flagged by
no-await-sync-query
, and they probably shouldn't be.The text was updated successfully, but these errors were encountered: