context("test-process")
APPDIR="../apps"
DATADIR="../data"
APPS <- c("working")
APPS <- as.list(setNames(file.path(APPDIR,APPS), APPS))
DATA <- c(
"working_1",
"working_1_no_mapping",
"working_2",
"working_3",
"missing_files",
"no_mapping_file",
"non_existing")
DATA <- as.list(setNames(file.path(DATADIR,DATA), DATA))
Map(function(name){
test_that("App loads", {
expect_error(
fastgenomicsR::Process(app_dir=APPS$working, data_dir=DATA[[name]]),
NA)
})}, c("working_1", "working_2", "working_3"))
Map(function(name){
test_that("App throws", {
expect_error(
fastgenomicsR::Process(app_dir=APPS$working, data_dir=DATA[[name]]),
"*input_file_mapping.json' does not exist")
})}, c("working_1_no_mapping", "no_mapping_file"))
Map(function(name){
test_that("App throws", {
expect_error(
fastgenomicsR::Process(app_dir=APPS$working, data_dir=DATA[[name]]),
"*does not exist")
})}, c("missing_files"))
Map(function(name){
test_that("App throws", {
expect_error(
fastgenomicsR::Process(app_dir=APPS$working, data_dir=DATA[[name]]),
"*non-existing-file.none' does not exist")
})}, c("non_existing"))
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.