Last active
August 22, 2017 08:24
-
-
Save czeildi/c64471b60d90346f18b4eb396b816bc8 to your computer and use it in GitHub Desktop.
code coverage with covr for a project which is not an R package
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# open Rproj with packrat | |
# restart R session | |
library("testthat") | |
source("libraries.R") | |
packrat::with_extlib( | |
c("rex", "covr", "DT"), { | |
library("rex") | |
library("covr") | |
library("DT") | |
covr::shine(covr::file_coverage( | |
list.files("src", full.names = TRUE), | |
list.files("test", full.names = TRUE) | |
), file = file.path(tempdir(), "code_coverage_report.html")) | |
} | |
) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment