Skip to content

Commit 1c71271

Browse files
committed
Update AssertSnapshot.swift
1 parent 05feabe commit 1c71271

File tree

1 file changed

+3
-5
lines changed

1 file changed

+3
-5
lines changed

Sources/SnapshotTesting/AssertSnapshot.swift

+3-5
Original file line numberDiff line numberDiff line change
@@ -199,11 +199,9 @@ public func verifySnapshot<Value, Format>(
199199
}
200200

201201
let testName = sanitizePathComponent(testName)
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 ?? "")
202+
let snapshotFileUrl = snapshotDirectoryUrl
203+
.appendingPathComponent("\(testName).\(identifier)")
204+
.appendingPathExtension(snapshotting.pathExtension ?? "")
207205
let fileManager = FileManager.default
208206
try fileManager.createDirectory(at: snapshotDirectoryUrl, withIntermediateDirectories: true)
209207

0 commit comments

Comments
 (0)