January 2019
Intermediate to advanced
272 pages
7h 40m
English
This chapter covers
If a tree falls in a forest and no one is around to hear it, does it make a sound? More importantly, if a component is mounted and no one writes a test for it, did it generate output?
Testing is about input and output. In a test you supply an input, receive an output, and assert that the output is correct. The most common output of components is the rendered output—the stuff that render functions generate. That’s what this chapter is about: testing rendered component output.
To learn how to test component output, you’ll write a static Hacker News feed. The news feed is simple, but it gives you the opportunity to test ...
Read now
Unlock full access