Prevent Visual Regressions
If you compose your React applications as we have been doing so far, there’s a clear separation between parts of the application that handle logic and parts that just concern themselves with the UI. Checking that the UI matches expectations is tedious. Even if a component outputs different HTML elements, the visual result might turn out to be identical, so tests that check the generated HTML might break even though the application still displays the expected UI. Although these sort of tests tend to break without good reason, you might not want to skip them completely, as they still can alert you that something is wrong. We’ll compromise and use a solution that will let you write and update tests very fast, so that you ...
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Read now
Unlock full access