Skip to content

An result builder extension to Swift Snapshot Testing

Notifications You must be signed in to change notification settings

unbtbl/SnapshotTestBuilder

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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

About

An result builder extension to Swift Snapshot Testing

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages