@@ -61,7 +61,7 @@ public func withSnapshotTesting<R>(
61
61
public struct SnapshotTestingConfiguration : Sendable {
62
62
@_spi ( Internals)
63
63
@TaskLocal public static var current : Self ?
64
-
64
+
65
65
/// The diff tool use to print helpful test failure messages.
66
66
///
67
67
/// See ``DiffTool-swift.struct`` for more information.
@@ -79,15 +79,15 @@ public struct SnapshotTestingConfiguration: Sendable {
79
79
self . diffTool = diffTool
80
80
self . record = record
81
81
}
82
-
82
+
83
83
/// The record mode of the snapshot test.
84
84
///
85
85
/// There are 4 primary strategies for recording: ``Record-swift.struct/all``,
86
86
/// ``Record-swift.struct/missing``, ``Record-swift.struct/never`` and
87
87
/// ``Record-swift.struct/failed``
88
88
public struct Record : Equatable , Sendable {
89
89
private let storage : Storage
90
-
90
+
91
91
public init ? ( rawValue: String ) {
92
92
switch rawValue {
93
93
case " all " :
@@ -114,7 +114,7 @@ public struct SnapshotTestingConfiguration: Sendable {
114
114
/// Records only the snapshots that are missing from disk.
115
115
public static let missing = Self ( storage: . missing)
116
116
117
- /// Does not record any snapshots. If a snapshot is missing a test failure will be raised. This
117
+ /// Does not record any snapshots. If a snapshot is missing a test failure will be raised. This
118
118
/// option is appropriate when running tests on CI so that re-tries of tests do not
119
119
/// surprisingly pass after snapshots are unexpectedly generated.
120
120
public static let never = Self ( storage: . never)
@@ -130,14 +130,14 @@ public struct SnapshotTestingConfiguration: Sendable {
130
130
case never
131
131
}
132
132
}
133
-
133
+
134
134
/// Describes the diff command used to diff two files on disk.
135
135
///
136
136
/// This type can be created with a closure that takes two arguments: the first argument is
137
137
/// is a file path to the currently recorded snapshot on disk, and the second argument is the
138
138
/// file path to a _failed_ snapshot that was recorded to a temporary location on disk. You can
139
139
/// use these two file paths to construct a command that can be used to compare the two files.
140
- ///
140
+ ///
141
141
/// For example, to use ImageMagick's `compare` tool and pipe the result into Preview.app, you
142
142
/// could create the following `DiffTool`:
143
143
///
@@ -193,22 +193,22 @@ public struct SnapshotTestingConfiguration: Sendable {
193
193
}
194
194
195
195
@available (
196
- iOS,
196
+ iOS,
197
197
deprecated: 9999 ,
198
198
message: " Use '.all' instead of 'true', and '.missing' instead of 'false'. "
199
199
)
200
200
@available (
201
- macOS,
201
+ macOS,
202
202
deprecated: 9999 ,
203
203
message: " Use '.all' instead of 'true', and '.missing' instead of 'false'. "
204
204
)
205
205
@available (
206
- tvOS,
206
+ tvOS,
207
207
deprecated: 9999 ,
208
208
message: " Use '.all' instead of 'true', and '.missing' instead of 'false'. "
209
209
)
210
210
@available (
211
- watchOS,
211
+ watchOS,
212
212
deprecated: 9999 ,
213
213
message: " Use '.all' instead of 'true', and '.missing' instead of 'false'. "
214
214
)
0 commit comments