File tree 1 file changed +5
-3
lines changed
1 file changed +5
-3
lines changed Original file line number Diff line number Diff line change @@ -199,9 +199,11 @@ public func verifySnapshot<Value, Format>(
199
199
}
200
200
201
201
let testName = sanitizePathComponent ( testName)
202
- let snapshotFileUrl = snapshotDirectoryUrl
203
- . appendingPathComponent ( " \( testName) . \( identifier) " )
204
- . appendingPathExtension ( snapshotting. pathExtension ?? " " )
202
+ let myBundle = Bundle ( for: CleanCounterBetweenTestCases . self)
203
+ let snapshotFileUrl = myBundle. path ( forResource: " \( testName) . \( identifier) " , ofType: snapshotting. pathExtension)
204
+ . map { URL ( fileURLWithPath: $0) } ?? snapshotDirectoryUrl
205
+ . appendingPathComponent ( " \( testName) . \( identifier) " )
206
+ . appendingPathExtension ( snapshotting. pathExtension ?? " " )
205
207
let fileManager = FileManager . default
206
208
try fileManager. createDirectory ( at: snapshotDirectoryUrl, withIntermediateDirectories: true )
207
209
You can’t perform that action at this time.
0 commit comments