testthat
testthat copied to clipboard
Provide a set of default transformers for snapshot tests?
Motivated by what we've added in renv, it feels like some subset could be useful more broadly in testthat. (The primary motivation: it can be frustrating when you try to write a snapshot test only to find it fails on Windows on CI because of something OS-specific.)
Some options:
- R version,
- Package version(s),
- Working directory (including aliased paths?)
- R temporary directory (including aliased paths?)
- Repository paths,
- Library paths,
- Elapsed times?
And it would be convenient if transformer could take a list of functions.
I haven't felt the itch for the helpers I think it's probably better to create on a case-by-case basis.