Skip to content

Commit

Permalink
Disable XCTAttachment when using Swift Testing
Browse files Browse the repository at this point in the history
  • Loading branch information
ralfebert authored Feb 4, 2025
1 parent f5bfff7 commit c7977a3
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions Sources/SnapshotTesting/Snapshotting/UIImage.swift
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,9 @@
let message = compare(
old, new, precision: precision, perceptualPrecision: perceptualPrecision)
else { return nil }
if isSwiftTesting {
return (message, [])
}
let difference = SnapshotTesting.diff(old, new)
let oldAttachment = XCTAttachment(image: old)
oldAttachment.name = "reference"
Expand Down

0 comments on commit c7977a3

Please sign in to comment.