Skip to content

Commit

Permalink
Deaktiver del av test med if-statement
Browse files Browse the repository at this point in the history
  • Loading branch information
arnfinn committed Jun 4, 2024
1 parent 8e80c68 commit 70a38e6
Showing 1 changed file with 8 additions and 2 deletions.
10 changes: 8 additions & 2 deletions tests/testthat/test-renderRmd.R
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,14 @@ test_that("Rmd source can be rendered", {
logoFile <- system.file("template/logo.png", package = "rapbase")
expect_true(file.exists(renderRmd(sourceFile)))
expect_true("html" %in%
class(renderRmd(sourceFile,outputType = "html_fragment"))
)
class(renderRmd(sourceFile, outputType = "html_fragment")))
if (Sys.getenv("GITHUB_ACTIONS_RUN_DB_UNIT_TESTS") != "true") {
expect_true(file.exists(renderRmd(sourceFile,
outputType = "pdf",
logoFile = logoFile,
params = list(reglogo = "logo")
)))
}
expect_error(renderRmd(sourceFile, outputType = "beamer"))
expect_error(renderRmd(sourceFile = "noneExistingFile.Rmd"))
})

0 comments on commit 70a38e6

Please sign in to comment.