Snapshot tests are a very useful tool whenever you want to make sure your UI does not change unexpectedly.
Instead of rendering the graphical UI, which would require building the entire app, you can use a test renderer to quickly generate a serializable value for your React tree.
Oftentimes when we not using snapshot testing you would end up writing tests like this:
// BuyNow.js