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
To run the example project, clone the repo, and run pod install
from the Example directory first.
Cocoapods or Swift 5.3 or later for swift package manager
Nimble-SnapshotTesting is available through CocoaPods. To install it, simply add the following line to your Podfile:
pod 'Nimble-SnapshotTesting'
For swift package manager
.package(url: "https://github.com/tahirmt/Nimble-SnapshotTesting.git", .upToNextMajor(from: "2.0.0")),
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)
Nimble-SnapshotTesting is available under the MIT license. See the LICENSE file for more info.