swift-snapshot-testing icon indicating copy to clipboard operation
swift-snapshot-testing copied to clipboard

Assign an empty image if a view of zero size is being snapshotted

Open davisg123 opened this issue 3 years ago • 1 comments

The previous logic was "If an image has a zero frame, make the comparison image the same as the reference image"

This means that tests incorrectly pass if the reference image exists and the comparison view has a size of zero

davisg123 avatar Jan 24 '22 22:01 davisg123

  • Note I think this is the same issue as https://github.com/pointfreeco/swift-snapshot-testing/pull/453

simondelphia avatar Mar 04 '22 02:03 simondelphia

@simondelphia Good catch. Thanks @davisg123 for the PR! We merged the first submission, but appreciate the time you took to fix the problem.

stephencelis avatar Sep 22 '22 00:09 stephencelis