{"repo":"pointfreeco/swift-snapshot-testing","free":true,"listed":false,"github":"https://github.com/pointfreeco/swift-snapshot-testing","clone":"git clone https://github.com/pointfreeco/swift-snapshot-testing.git","description":"📸 Delightful Swift snapshot testing.","language":"Swift","stars":4319,"topics":["swift","testing","snapshot-testing","screenshot-testing"],"license":"MIT","category":"dev-tools","readme_excerpt":"📸 SnapshotTesting Delightful Swift snapshot testing. Usage Once installed, no additional configuration is required . You can import the SnapshotTesting module and call the assertSnapshot function. When an assertion first runs, a snapshot is automatically recorded to disk and the test will fail, printing out the file path of any newly-recorded reference. ❌ failed - No reference was found on disk. Automatically recorded snapshot: … open \"…/MyAppTests/\\ \\ Snapshots\\ \\ /MyViewControllerTests/testMyViewController.png\" Re-run \"testMyViewController\" to test against the newly-recorded snapshot. Repeat test runs will load this reference and compare it with the runtime value. If they don't match, the test will fail and describe the difference. Failures can be inspected from Xcode's Report Navigator or by inspecting the file URLs of the failure. You can record a new reference by customizing snapshots inline with the assertion, or using the withSnapshotTesting tool: Snapshot Anything While most snapshot testing libraries in the Swift community are limited to UIImage s of UIView s, SnapshotTesting can work with any format of any value on any Swift platform! The assertSnapshot function accepts a value and any snapshot strategy that value supports. This means that a view or view controller can be tested against an image representation and against a textual representation of its properties and subview hierarchy. View testing is highly configurable. You can override trait collections (for sp","default_branch":null,"files":null,"tree":[],"storefront":"/r/pointfreeco","claimed":false,"request_supported":{"post":"https://gitbuyer.com/r/pointfreeco/swift-snapshot-testing/request-supported","requests":0},"note":"indexed from public GitHub; nothing is for sale on this page. Clone it from GitHub. Paid listings live at /search."}