snapshottest icon indicating copy to clipboard operation
snapshottest copied to clipboard

Configure snapshots directory

Open chandlerroth opened this issue 5 years ago • 3 comments

Right now snapshots are stored in a preconfigured snapshots/ directory — it would be nice if this was customizable, especially if an existing directory with the same name exists.

chandlerroth avatar Jun 25 '19 19:06 chandlerroth

If this is important to your workflow, I could see adding a global option for this via setup.cfg. Pull request welcome!

paulmelnikow avatar Sep 29 '20 23:09 paulmelnikow

It looks like this change would require that we change "snapshots" on this line

https://github.com/syrusakbary/snapshottest/blob/fe2fd80bfd2ae36adcae89fd4f57a563ffb68003/snapshottest/module.py#L187

into something configurable. I didn't quite get your reference to setup.cfg, though, and more generally, I don't really see other patterns for other configurable options for other snapshot test functionality. I might imagine, for example, that when used with Django, this might go into the settings.py folder, but I"m not sure what the equivalent for other test environments is.

Any opinions on how we set this?

StoicLoofah avatar Nov 19 '20 05:11 StoicLoofah

This feature would be very helpful. I would like to change the folder name to __snapshots__ to make it clear that it's not a regular folder.

matheusmb avatar Dec 16 '20 18:12 matheusmb