Skip to content

tahirmt/Nimble-SnapshotTesting

main
Switch branches/tags

Name already in use

A tag already exists with the provided branch name. Many Git commands accept both tag and branch names, so creating this branch may cause unexpected behavior. Are you sure you want to create this branch?
Code

Latest commit

 

Git stats

Files

Permalink
Failed to load latest commit information.

Nimble-SnapshotTesting

CI Version License Platform

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

To run the example project, clone the repo, and run pod install from the Example directory first.

Requirements

Cocoapods or Swift 5.3 or later for swift package manager

Installation

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")),

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.

About

A helper library to create a Nimble matcher for swift-snapshot-testing framework

Resources

License

Stars

Watchers

Forks

Packages

No packages published