We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 9fc8bc9 commit 016b378Copy full SHA for 016b378
Sources/TestingExtensions/SnapshotTestBase.swift
@@ -33,6 +33,7 @@ open class SnapshotTestBase: XCTestCase {
33
_ view: V,
34
devices: [(name: String, device: ViewImageConfig)]? = nil,
35
style: [UIUserInterfaceStyle] = [.unspecified],
36
+ imageDiffPrecision: Float = 1.0,
37
file: StaticString = #file,
38
testName: String = #function,
39
line: UInt = #line
@@ -56,7 +57,7 @@ open class SnapshotTestBase: XCTestCase {
56
57
58
assertSnapshot(
59
matching: vc,
- as: .image(on: config.device),
60
+ as: .image(on: config.device, precision: imageDiffPrecision),
61
file: file,
62
testName: "\(testName)-\(config.name)\(suffix)",
63
line: line
0 commit comments