test_that("Example xpt files are correctly extracted to the specified folder", {
expect_setequal(object = file_ext(res), expected = "xpt")
test_that("An example metadata file is correctly created", {
expect_equal(object = basename(res), expected = "metadata.yml")
test_that("Report skeleton files are correctly copied to the specified folder", {
expected = c("config", "figures", "index.Rmd")
expect_setequal(object = file_ext(resConfig), expected = "yml")
expect_setequal(object = file_ext(resFigures), expected = c("svg", "png"))
test_that("Example of the main config file is correctly created", {
expect_equal(object = res, expected = "config.yml")
test_that("A report skeleton, consisting of config files, XPT datasets, figures and index file is correctly created", {
expected = c("config", "data", "figures", "index.Rmd")
test_that("A warning is generated during the skeleton creation when the specified folder is not empty", {
test_that("A skeleton report is successfully executed", {
# fix for: 'Using anchor_sections requires Pandoc 2.0+'
condition = rmarkdown::pandoc_available(version = "2.0"),
# Track warnings during execution of example report:
quiet = TRUE, # suppress printing of pandoc cmd line
# check that import parameters is successful & all chapters are successfully created
"Extraction of the parameters.*failed|Rendering of the.*report failed",
test_that("A skeleton report is successfully executed in parallel", {
resReport <- file.path(dirSkeleton, "report", "1-introduction.html")

"Example xpt files are correctly extracted to the specified folder"
"An example metadata file is correctly created"
"Report skeleton files are correctly copied to the specified folder"
"Example of the main config file is correctly created"
"A report skeleton, consisting of config files, XPT datasets, figures and index file is correctly created"
"A warning is generated during the skeleton creation when the specified folder is not empty"
"A skeleton report is successfully executed"
"Extraction of the parameters.*failed|Rendering of the.*report failed"
"A skeleton report is successfully executed in parallel"

Example xpt files are correctly extracted to the specified folder