-
Notifications
You must be signed in to change notification settings - Fork 36
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
Option to define snapshot directory name #810
Comments
It's possible to implement a custom dirname via a custom snapshot extension. I agree though that first-party support would be welcome and preferred. We reference the snapshot name in a couple places, mostly coming from the base extension abstract class. We don't currently expose syrupy options to the extension itself though. This would be far easier after #816 is implemented. We might be able to come up with a bit more of a hacky solution or workaround until PR 816 and subsequent related changes are merged though. |
Very loosely related to #868 (both deal with snapshot names, though the other issue is a bug, this one is a featue request, linking for discoverability). |
Is your feature request related to a problem? Please describe.
I prefer to name my snapshot directory
snapshots
instead of__snapshots__
. I feel the underscores are unnecessary noise.Describe the solution you'd like
A CLI option
--snapshot-dirname <name>
Describe alternatives you've considered
None
Additional context
In JS, I use vitest's resolveSnapshotPath option for the same, it is a bite more flexible as it allows full customization of the path, but I guess I would be happy with a static option just to define the directory name.
The text was updated successfully, but these errors were encountered: