Rtest.R

## need node_modules directories
dot_is <- getwd()
node_paths <- dir(dot_is,pattern='\\.Rlibs',
                  full.names=TRUE,recursive=TRUE,
                  ignore.case=TRUE,include.dirs=TRUE,
                  all.files = TRUE)
path <- normalizePath(node_paths, winslash = "/", mustWork = FALSE)
lib_paths <- .libPaths()
.libPaths(c(path, lib_paths))

pkg <- devtools::as.package('.')
ns_env <- devtools::load_all(pkg,quiet = TRUE)$env

## need env for test file
Sys.setenv(R_CONFIG=paste(dot_is,'test.config.json',sep='/'))

## devtools::check()
devtools::test()
jmarca/calvad_hpms_r_parsing documentation built on May 19, 2019, 1:50 p.m.