A practical introduction to snapshot testing
While working a little bit on laravel-sitemap I decided to refactor the tests to make use of our own snapshot assertions package. The snapshot package enables you to generate snapshots with the output of your tests. On subsequent runs of those tests it can assert if the output still matches the contents of the snapshot.
In this video I demonstrate how the refactor of the tests of laravel-sitemap was done. (double-click on it to view it full-screen)
If you want to know more about snapshot testing, then read this blog post written by my colleague Sebastian. The refactor of the tests can be viewed in this commit on GitHub.
(Little note on the video itself: this is my first tutorial video I ever made. After recording it I noticed that I used a wrong ratio resulting in those black bars on the side. Ah well, you live you learn. Next time it will be better. For those interested, I used a Blue Yeti Pro mic to record my voice and ScreenFlow to record and edit the video.)
What are your thoughts on "A practical introduction to snapshot testing"?