Skip to content

Latest commit

 

History

History
20 lines (14 loc) · 578 Bytes

README.md

File metadata and controls

20 lines (14 loc) · 578 Bytes

SnapshotBuilder

This is an extension to the swift-snapshot-testing library that adds a SwiftUI result builder to make snapshot testing SwiftUI views even easier.

Usage

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()
    }
}