The devel version seems to be leaving an empty _snaps
folder if there are no snapshots. This is exposed during package build, so it would be nice to avoid if possible.
e.g.
* checking for empty or unneeded directories
Removed empty directory ‘usethis/tests/testthat/_snaps’
Is there a way to keep the _snaps
folder even if there are no snapshots? I have saved some .Rdata in that directory and plan to use them in test files. The reason is that those are simulated data, and takes so long if running in test scripts.
@ashirazist the _snaps
directory is "owned" by testthat. You should not put your own data there.
@hadley Thanks for reminding that. I know that, but I cannot figure out a place to put the data that's used in test files. Do you suggest anything?
You can put it anywhere else in tests/testthat
. Best not to start the directory and file names with an underscore. I like to put them in fixtures
.