When running covr::package_coverage()
the output from the tests (such as testthat::SummaryReporter
is suppressed. Is there anyway to have it show up (and in particular, update while the code is running)?
Using the {here} package as an example because it has short tests, I get the following:
covr::package_coverage(
".",
type = "none",
code = "testthat::test_package('here', reporter = testthat::SummaryReporter)",
quiet = FALSE
)
#> * installing *source* package βhereβ ...
#> ** using non-staged installation
#> ** R
#> ** inst
#> ** tests
#> ** byte-compile and prepare package for lazy loading
#> ** help
#> *** installing help indices
#> converting help for package βhereβ
#> dr_here example
#> here example
#> i_am example
#> *** copying figures
#> ** building package indices
#> ** installing vignettes
#> ** testing if installed package can be loaded
#> * DONE (here)
#> here Coverage: 98.67%
#> R/i_am.R: 95.83%
#> R/aaa.R: 100.00%
#> R/dr_here.R: 100.00%
#> R/here.R: 100.00%
#> R/set_here.R: 100.00%
#> R/zzz.R: 100.00%
But I want the output to include this (and update while it's in progress):
setwd("tests")
testthat::test_package('here', reporter = testthat::SummaryReporter)
#> dr_here: ....
#> here: .
#> i_am: ...
#> set_here: ...
#>
#> ββ DONE βββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
#> πππππππππππ
#> No snapshots to update