Skip to content

Files

Latest commit

2aab338 · Feb 22, 2025

History

History
44 lines (27 loc) · 1.46 KB

README.md

File metadata and controls

44 lines (27 loc) · 1.46 KB

Nimble-SnapshotTesting

CI

A Nimble matcher for https://github.com/pointfreeco/swift-snapshot-testing inspired from the work in https://github.com/ashfurrow/Nimble-Snapshots and https://github.com/Killectro/swift-snapshot-testing-nimble

Example

The example project exists at Example-SPM however it is not necessary.

Requirements

Swift 5.9 or later for swift package manager

Installation

For swift package manager

.package(url: "https://github.com/tahirmt/Nimble-SnapshotTesting.git", from: "4.0.0"),

Usage

To use the library with Nimble you have two ways

let view = UIView()
expect(view).to(haveValidSnapshot(as: .image))

or you can even use the == syntax

let view = UIView()
expect(view) == snapshot(as: .image)

License

Nimble-SnapshotTesting is available under the MIT license. See the LICENSE file for more info.