-
Notifications
You must be signed in to change notification settings - Fork 2
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
[Snapshots] Cannot snapshot two previews in different files with same package #174
Comments
The best workaround for this currently is one of three options:
We're looking into use the file as an additional key in the future to solve this, but there's currently no ETA on that change. |
We've also seen cases where this bug can prevent other snapshot tests from running due to early exits from snapshot runs. We'd encourage the above workaround for any errors where a stacktrace like the following is present:
|
We've had a client present an edge case that causes snapshots to fail when two different preview functions live in separate files with the same package/name:
We use the FQN of the composable function as the primary key (with preview details), meaning in both cases the key is
com.example.MyPreview
. Depending on which is invoked first, the second will result in a crash as a snapshot with that key has already been saved.The text was updated successfully, but these errors were encountered: