Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Expose snapshotDirectory parameter in assertSnapshot methods #934

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

fespinoza
Copy link

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.

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.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant