Open shirotech opened 4 years ago
@meinaart would like your thoughts on this, thanks.
This is mostly done because snapshotTitle comes from the test file. And could contain a / in the name of the test. This should not result in a file that is created in a different directory.
@meinaart we have results in thousands of snapshot image files, what is the way to manage it other than have them in organized folder structures?
Perhaps an override of the filename could be a nice feature. The need for sanitation is now mostly because it's derived from the name of the test.
I'm not sure why we need to "sanitize" files, all test are under a controlled environment and doesn't expose to any sort of threat. It seems to be doing more harm than good, e.g. with this kind of naming restriction I can't even assign files under different directories as the
/
char gets stripped. Also, another prime example is I see that in https://github.com/meinaart/cypress-plugin-snapshots/blob/89f0dca1a2feec0a0a4b02d7bf4e8b119f4e6a16/src/utils/getTestTitle.js#L2 the>
separator also gets stripped, so I'm still wondering if we can remove this altogether?