This is an extension to the swift-snapshot-testing library that adds a SwiftUI result builder to make snapshot testing SwiftUI views even easier.
For iOS, just use @DeviceSnapshotBuilder
on a test function, then create the view you want to test.
The following example is a fully functional snapshot test case:
import SnapshotTestBuilder
final class MyAppTests: XCTestCase {
@DeviceSnapshotTestBuilder
func testContentViewSnapshot() {
ContentView()
}
}