The SnapshotTesting library provides a lot of easy ways to test UI code without automated UI testing.
It essentially generates screenshots of anything in UIKit, and since we can wrap SwiftUI views in a UIHostingController
, SwiftUI as well.
Create a new Xcode SwiftUI project and call it whatever you want, I called mine Test…
Keep reading with a 7-day free trial
Subscribe to Type Safely to keep reading this post and get 7 days of free access to the full post archives.