Snapshot Testing
Learn how to track changes in components through snapshot testing.
We'll cover the following...
Snapshot testing to test renderings
Creating Storybook stories to show the various versions of the React components is the difficult part. While we can’t automate their acceptance, since the component’s appearance must be judged visually, we can streamline the judging process using snapshots. The idea behind a snapshot is that it captures the output and compares it to the previous version. Only those that have changed will need to be reviewed.
To create the snapshot tests, we need to install the renderer and the Jest piece of the ...