We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
None of my tests use snapshots. The initial state of my testthat directory is that there is no _snaps subdirectory.
testthat
_snaps
When I run devtools::test() I can see that the _snaps folder is created and then removed during the testing process.
devtools::test()
When I run devtools::test() with the filter argument to run a subset of tests, the _snaps folder is created but not removed.
filter
To reproduce, clone the latest version of this testthat repo, open testthat.Rproj, and step through the following code:
testthat.Rproj
# setup paths snaps_path <- file.path('tests', 'testthat', '_snaps') snaps_backup_path <- file.path('tests', 'testthat', '_snaps_backup') # backup existing _snaps folder file.rename(snaps_path, snaps_backup_path) #[1] TRUE # _snaps folder doesn't exist now file.exists(snaps_path) #[1] FALSE # these tests contain no snapshots devtools::test(filter = '^bare$') #ℹ Testing testthat #Starting 1 test process #✔ | F W S OK | Context #✔ | 4 | bare # #══ Results #Duration: 2.3 s #[ FAIL 0 | WARN 0 | SKIP 0 | PASS 4 ] # _snaps folder got created file.exists(snaps_path) #[1] TRUE # restore existing _snaps folder unlink(snaps_path, recursive = TRUE) file.rename(snaps_backup_path, snaps_path) #[1] TRUE
See also:
#1180
The text was updated successfully, but these errors were encountered:
Is this causing problems for you?
Sorry, something went wrong.
No branches or pull requests
None of my tests use snapshots. The initial state of my
testthat
directory is that there is no_snaps
subdirectory.When I run
devtools::test()
I can see that the_snaps
folder is created and then removed during the testing process.When I run
devtools::test()
with thefilter
argument to run a subset of tests, the_snaps
folder is created but not removed.To reproduce, clone the latest version of this
testthat
repo, opentestthat.Rproj
, and step through the following code:See also:
#1180
The text was updated successfully, but these errors were encountered: