Skip to content

Commit

Permalink
loop test over all languages
Browse files Browse the repository at this point in the history
  • Loading branch information
maxheld83 committed Dec 9, 2021
1 parent 805f5da commit 152f621
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 2 deletions.
1 change: 1 addition & 0 deletions R/test-helpers.R
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,7 @@ strategies <- list(
)

#' Skipping unsupported strategies
#' @noRd
skip_if_strategy_unsupported <- function(strategy_name = names(strategies)) {
strategy_name <- rlang::arg_match(strategy_name)
if (strategy_name == "multicore" && !future::supportsMulticore()) {
Expand Down
11 changes: 9 additions & 2 deletions tests/testthat/test-report.R
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,14 @@ test_that("draft can be created from template", {
})

test_that("parametrised report can be rendered", {
expect_invisible(
render_report(output_file = withr::local_tempfile(), quiet = TRUE)
purrr::walk(
.x = mc_langs,
.f = function(x) {
translator <- mc_translator()
translator$set_translation_language(x)
expect_invisible(
render_report(output_file = withr::local_tempfile(), quiet = TRUE)
)
}
)
})

0 comments on commit 152f621

Please sign in to comment.