kentcdodds/testing-react-apps

Exercice 6: use waitForElementToBeRemoved instead of manual await

ValentinH opened this issue ยท 2 comments

This is a follow-up after a discussion on Discord.

In exercice 6, we need to use act(). When doing the exercice, I used waitForElementToBeRemoved(). Isn't this better than manually awaiting for the promise? Maybe, waiting for the promise in this lesson was for introducing when/how to use act() ?
image

If you change it, it might also impact the "extra credit 1" as there is no promise there and act is used.

I'll make sure to do this in the updated version ๐Ÿ‘

This update has happened in the next branch ๐Ÿ‘