Skip to content

filecovRunit is a small R-package which extends the file_coverage()-function from R's covr-Package so that it also runs with RUnit-tests.

Notifications You must be signed in to change notification settings

simschul/filecovRunit

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

18 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

filecovRunit

filecovRunit is a small R-package which extends the file_coverage()-function from R's covr-Package.

Installation

devtools::install_github("simschul/filecovRunit")

Example

Load test data. One source file (src) which contains functions to be tested, and one test file containing Runit-tests.

src <- c(system.file(file.path("extdata", "functions.R"), package = "filecovrunit"),
system.file(file.path("extdata", "functions2.R"), package = "filecovrunit"))
test <- c(system.file(file.path("extdata", "test_1.R"), package = "filecovrunit"),
system.file(file.path("extdata", "test_2.R"), package = "filecovrunit"))

Now let's check the code coverage of the files:

cov <- filecovrunit::file_coverage_runit(source_files = src, test_files = test, load_package = FALSE)
cov
covr::report(cov)
filecovrunit::zero_coverage(cov)

About

filecovRunit is a small R-package which extends the file_coverage()-function from R's covr-Package so that it also runs with RUnit-tests.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages