Technical requirements
The code in this chapter is based on Xcode 12 and iOS 14.
The first recipe, Snapshot testing SwiftUI views, has the optional requirement of using Kaleidoscope (https://www.kaleidoscopeapp.com) to compare two images. Kaleidoscope is not free, but it offers a 14-day trial.
You can find the code in the book's GitHub repo under the path https://github.com/PacktPublishing/SwiftUI-Cookbook/tree/master/Chapter13%20-%20SwiftUI%20Tips%20and%20Tricks.