NOTE: React Suspense for data fetching is VERY ALPHA and this API is undocumented, unsupported, and will likely change.
Our Counter
component has grown in complexity and we need to figure out how to get it tested. In this lesson, we'll learn how to test the effects that are generated with useEffect
.
We'll cover:
afterEach
awesome tests!
Looks like you added 3 expect
s but your test output only show 2 test passing?
Hi Kent. Great videos, thanks! When I watched this the first time it was part of a playlist covering a lot of nice things regarding hooks and suspense, but now I can't find the playlist anymore… What happened?
Tomeu, thanks!
Shawn, the output only shows one test for each call of test
. You can have multiple expect
s in a single test.
House, thanks! You can find the full playlist here: http://kcd.im/hooks-and-suspense
Egghead's working on making playlists surface better in the UI.