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

I would like to Configure the name of the snapshooter files #171

Open
ncmindera opened this issue Feb 9, 2023 · 0 comments
Open

I would like to Configure the name of the snapshooter files #171

ncmindera opened this issue Feb 9, 2023 · 0 comments

Comments

@ncmindera
Copy link

ncmindera commented Feb 9, 2023

Is your feature request related to a problem? Please describe.
the files generated are too long and can't go to git

Describe the solution you'd like
I would like to be able to configure the snapshooter file names pattern to something shorter, or just have a guid generated for each combination of class, method, params.

e.g. for the test in this class
ClassTests.TestName.TestCaseParams => The file create is a Guid -> 2d5aa143-37c0-4422-bcf9-8489eb6e548e.snap

inside this file you guys can have the long name you usually generate, plus the data.

{
     "snapshot_name": "the long name you have now", 
     "snapshot_data": {
         "someData" : "data to match with"
      }
}

by doing this each file has the same length (36 char), that is in general much shorter too.
this way is more stable in my opinion, because nobody cares about those files, we just care about the match, we don't want this files to get us into any trouble.

Describe alternatives you've considered
Alternative is to change method name, or use another snapshot tool.

Additional context
I don't like the idea of having to change method names because Snapshooter generates long file names that can go to git. this is because some of our tests have long names.

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

No branches or pull requests

1 participant