-
Notifications
You must be signed in to change notification settings - Fork 28
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
Support non json #109
Comments
Thanks for the suggestion! Hmm this is something Snapper V1 used to support but it was much harder to maintain and I didn't see many users wanting that functionality. Since then I've added Snapshots per class and Child snapshots as features which is something that really only works with json or some form of structured format. These features would break if we wanted to store without json conversions. I think there are two options for next steps
|
The second option would match my use case. Child snapshots could be implemented using an extended file name. I could investigate an implementation, if this is something you feel like fits the library. |
There is a problem with comparing datetimes in DevOps. When making the snapper json files locally (in another time zone) and then running the tests in DevOps, the time zone might change for the datetime and the test fails.
If the json file would be replaced with a snap file (for instance), would the datetime value be compared as a string? |
Probably yes, |
Yes, the latter was our solution to the problem. Will investigate if the first is an option in our context. |
Is your feature request related to a problem? Please describe.
The current snapshot functionality always uses json to store the snapshot data. When the string is not valid json, it is stored as a json string. This conversion and escaping makes it difficult to read larger chunks of e.g. serialized generated code.
Describe the solution you'd like
Id like a new api to snapshot strings (and potentially other objects) straight to a file, without any json conversion.
Solutions like Verify support this scenario, but i much prefer the snapper workflow.
The text was updated successfully, but these errors were encountered: