swift-snapshot-testing
swift-snapshot-testing copied to clipboard
Expose `snapshotDirectory` parameter in `assertSnapshot` methods
I'm aware of the intention of the publicly available verifySnapshot method that exposes this parameter, but as consumers of the library we tend to use assertSnapshot instead.
assertSnapshot implementation has a very straightforward implementation that internally uses verifySnapshot, but now custom implementations also need to be aware if the custom method is used on a XCTest or SwiftTesting context.
This library already handles that variation, then simply exposing this parameter doesn't break the API and makes sure consumers keep the correct behavior of assertSnapshots in context where we need to modify the snapshotDirectory, like in Xcode Cloud.