Running ‘testthat.R’ [35s/20s]
Running the tests in ‘tests/testthat.R’ failed.
Complete output:
  > # This file is part of the standard setup for testthat.
  > # It is recommended that you do not modify it.
  > #
  > # Where should you do additional test configuration?
  > # Learn more about the roles of various files in:
  > # * https://r-pkgs.org/testing-design.html#sec-tests-files-overview
  > # * https://testthat.r-lib.org/articles/special-files.html
  > 
  > library(testthat)
  > library(visOmopResults)
  > 
  > test_check("visOmopResults")
  Starting 2 test processes
  [ FAIL 18 | WARN 32 | SKIP 0 | PASS 272 ]
  
  ══ Failed tests ════════════════════════════════════════════════════════════════
  ── Error ('test-formatTable.R:7:3'): test it works ─────────────────────────────
  <packageNotFoundError/error/condition>
  Error in `loadNamespace(x)`: there is no package called 'gt'
  Backtrace:
      ▆
   1. ├─visOmopResults::formatTable(result) at test-formatTable.R:7:3
   2. │ └─visOmopResults:::validateStyle(style, type)
   3. │   ├─base::eval(...)
   4. │   │ └─base::eval(...)
   5. │   └─visOmopResults:::gtStyleInternal(styleName = style)
   6. └─base::loadNamespace(x)
   7.   └─base::withRestarts(stop(cond), retry_loadNamespace = function() NULL)
   8.     └─base (local) withOneRestart(expr, restarts[[1L]])
   9.       └─base (local) doWithOneRestart(return(expr), restart)
  ── Error ('test-gtTable.R:9:3'): gtTable ───────────────────────────────────────
  <rlib_error_package_not_found/rlang_error/error/condition>
  Error in `gtTableInternal(table_to_format, style = list(header = list(gt::cell_fill(color = "#c8c8c8"), 
      gt::cell_text(weight = "bold")), header_name = list(gt::cell_fill(color = "#d9d9d9"), 
      gt::cell_text(weight = "bold")), header_level = list(gt::cell_fill(color = "#e1e1e1"), 
      gt::cell_text(weight = "bold")), column_name = list(gt::cell_text(weight = "bold")), 
      title = list(gt::cell_text(weight = "bold", color = "blue"))), 
      na = NULL, title = "Test 1", subtitle = NULL, caption = NULL, 
      groupColumn = NULL, groupAsColumn = FALSE, groupOrder = NULL)`: The package "gt" is required.
  Backtrace:
      ▆
   1. └─visOmopResults:::gtTableInternal(...) at test-gtTable.R:9:3
   2.   └─rlang::check_installed("gt")
  ── Error ('test-gtTable.R:165:3'): gtTable, test default styles and NULL ───────
  <rlib_error_package_not_found/rlang_error/error/condition>
  Error in `gtTableInternal(table_to_format, style = NULL, na = NULL, title = "Test 1", 
      subtitle = NULL, caption = NULL, groupColumn = NULL, groupAsColumn = FALSE, 
      groupOrder = NULL)`: The package "gt" is required.
  Backtrace:
      ▆
   1. └─visOmopResults:::gtTableInternal(...) at test-gtTable.R:165:3
   2.   └─rlang::check_installed("gt")
  ── Error ('test-gtTable.R:232:3'): gtTable, test merge ─────────────────────────
  <rlib_error_package_not_found/rlang_error/error/condition>
  Error in `gtTableInternal(table_to_format, style = gtStyleInternal("default"), 
      na = "-", title = "Title test 2", subtitle = "Subtitle for test 2", 
      caption = "*This* is the caption", groupColumn = list(group_level = "group_level"), 
      groupAsColumn = FALSE, groupOrder = NULL, merge = "all_columns")`: The package "gt" is required.
  Backtrace:
      ▆
   1. └─visOmopResults:::gtTableInternal(...) at test-gtTable.R:232:3
   2.   └─rlang::check_installed("gt")
  ── Error ('test-gtTable.R:300:3'): groupColumn ─────────────────────────────────
  <rlib_error_package_not_found/rlang_error/error/condition>
  Error in `gtTableInternal(table_to_format, style = gtStyleInternal("default"), 
      na = "-", title = "Title test 2", subtitle = "Subtitle for test 2", 
      caption = "*This* is the caption", groupColumn = list(group_name_group_level = c("group_name", 
          "group_level")), groupAsColumn = TRUE, groupOrder = NULL, 
      merge = "all_columns")`: The package "gt" is required.
  Backtrace:
      ▆
   1. └─visOmopResults:::gtTableInternal(...) at test-gtTable.R:300:3
   2.   └─rlang::check_installed("gt")
  ── Error ('test-gtTable.R:341:3'): lifestyle::deprecate_soft works ─────────────
  <packageNotFoundError/error/condition>
  Error in `loadNamespace(x)`: there is no package called 'gt'
  Backtrace:
       ▆
    1. ├─testthat::expect_warning(gtTable(x)) at test-gtTable.R:341:3
    2. │ └─testthat:::expect_condition_matching(...)
    3. │   └─testthat:::quasi_capture(...)
    4. │     ├─testthat (local) .capture(...)
    5. │     │ └─base::withCallingHandlers(...)
    6. │     └─rlang::eval_bare(quo_get_expr(.quo), quo_get_env(.quo))
    7. ├─visOmopResults::gtTable(x)
    8. │ └─visOmopResults::formatTable(...)
    9. │   └─visOmopResults:::validateStyle(style, type)
   10. │     ├─base::eval(...)
   11. │     │ └─base::eval(...)
   12. │     └─visOmopResults:::gtStyleInternal(styleName = style)
   13. └─base::loadNamespace(x)
   14.   └─base::withRestarts(stop(cond), retry_loadNamespace = function() NULL)
   15.     └─base (local) withOneRestart(expr, restarts[[1L]])
   16.       └─base (local) doWithOneRestart(return(expr), restart)
  ── Error ('test-fxTable.R:9:3'): fxTableInternal ───────────────────────────────
  <rlib_error_package_not_found/rlang_error/error/condition>
  Error in `fxTableInternal(table_to_format, style = list(header = list(cell = officer::fp_cell(background.color = "#c8c8c8"), 
      text = officer::fp_text(bold = TRUE)), header_name = list(cell = officer::fp_cell(background.color = "#d9d9d9"), 
      text = officer::fp_text(bold = TRUE)), header_level = list(cell = officer::fp_cell(background.color = "#e1e1e1"), 
      text = officer::fp_text(bold = TRUE)), column_name = list(text = officer::fp_text(bold = TRUE)), 
      title = list(text = officer::fp_text(bold = TRUE, color = "blue"))), 
      na = NULL, title = "Test 1", subtitle = NULL, caption = NULL, 
      groupColumn = NULL, groupAsColumn = FALSE, groupOrder = NULL)`: The package "flextable" is required.
  Backtrace:
      ▆
   1. └─visOmopResults:::fxTableInternal(...) at test-fxTable.R:9:3
   2.   └─rlang::check_installed("flextable")
  ── Error ('test-fxTable.R:157:3'): fxTableInternal, test default styles and NULL ──
  <rlib_error_package_not_found/rlang_error/error/condition>
  Error in `fxTableInternal(table_to_format, style = NULL, na = NULL, title = "Test 1", 
      subtitle = NULL, caption = NULL, groupColumn = NULL, groupAsColumn = FALSE, 
      groupOrder = NULL)`: The package "flextable" is required.
  Backtrace:
      ▆
   1. └─visOmopResults:::fxTableInternal(...) at test-fxTable.R:157:3
   2.   └─rlang::check_installed("flextable")
  ── Error ('test-fxTable.R:231:3'): fxTableInternal, test merge ─────────────────
  <rlib_error_package_not_found/rlang_error/error/condition>
  Error in `fxTableInternal(x = table_to_format, style = style, na = "-", 
      title = "Title test 2", subtitle = "Subtitle for test 2", 
      caption = "*This* is the caption", groupColumn = list(group_level = "group_level"), 
      groupAsColumn = FALSE, groupOrder = NULL, merge = "all_columns")`: The package "flextable" is required.
  Backtrace:
      ▆
   1. └─visOmopResults:::fxTableInternal(...) at test-fxTable.R:231:3
   2.   └─rlang::check_installed("flextable")
  ── Error ('test-fxTable.R:293:3'): multiple groupColumn ────────────────────────
  <rlib_error_package_not_found/rlang_error/error/condition>
  Error in `fxTableInternal(table_to_format, delim = ":", style = list(subtitle = list(text = officer::fp_text(bold = TRUE, 
      font.size = 12, color = "blue")), body = list(text = officer::fp_text(color = "red"), 
      cell = officer::fp_cell(border = officer::fp_border())), 
      group_label = list(cell = officer::fp_cell(background.color = "#e1e1e1"), 
          text = officer::fp_text(color = "blue")), header_name = list(cell = officer::fp_cell(background.color = "black"), 
          text = officer::fp_text(color = "white"))), na = "-", 
      title = "Title test 2", subtitle = "Subtitle for test 2", 
      caption = "*This* is the caption", groupColumn = list(group_name_group_level = c("group_name", 
          "group_level")), groupAsColumn = TRUE)`: The package "flextable" is required.
  Backtrace:
      ▆
   1. └─visOmopResults:::fxTableInternal(...) at test-fxTable.R:293:3
   2.   └─rlang::check_installed("flextable")
  ── Error ('test-fxTable.R:345:3'): lifestyle::deprecate_soft works ─────────────
  <rlib_error_package_not_found/rlang_error/error/condition>
  Error in `fxTableInternal(x, delim = delim, style = style, na = na, title = title, 
      subtitle = subtitle, caption = caption, groupColumn = groupColumn, 
      groupAsColumn = groupAsColumn, groupOrder = groupOrder, merge = merge)`: The package "flextable" is required.
  Backtrace:
       ▆
    1. ├─testthat::expect_warning(fxTable(x)) at test-fxTable.R:345:3
    2. │ └─testthat:::expect_condition_matching(...)
    3. │   └─testthat:::quasi_capture(...)
    4. │     ├─testthat (local) .capture(...)
    5. │     │ └─base::withCallingHandlers(...)
    6. │     └─rlang::eval_bare(quo_get_expr(.quo), quo_get_env(.quo))
    7. └─visOmopResults::fxTable(x)
    8.   └─visOmopResults::formatTable(...)
    9.     └─visOmopResults:::fxTableInternal(...)
   10.       └─rlang::check_installed("flextable")
  ── Error ('test-visTable.R:4:3'): visTable with SR ─────────────────────────────
  <packageNotFoundError/error/condition>
  Error in `loadNamespace(x)`: there is no package called 'gt'
  Backtrace:
       ▆
    1. ├─visOmopResults::visTable(...) at test-visTable.R:4:3
    2. │ └─visOmopResults::formatTable(...)
    3. │   └─visOmopResults:::validateStyle(style, type)
    4. │     ├─base::eval(...)
    5. │     │ └─base::eval(...)
    6. │     └─visOmopResults:::gtStyleInternal(styleName = style)
    7. └─base::loadNamespace(x)
    8.   └─base::withRestarts(stop(cond), retry_loadNamespace = function() NULL)
    9.     └─base (local) withOneRestart(expr, restarts[[1L]])
   10.       └─base (local) doWithOneRestart(return(expr), restart)
  ── Failure ('test-visOmopTable.R:3:3'): visOmopTable ───────────────────────────
  Expected `... <- NULL` to run without any errors.
  i Actually got a <packageNotFoundError> with text:
    there is no package called 'gt'
  Backtrace:
      ▆
   1. ├─testthat::expect_message(...) at test-visOmopTable.R:3:3
   2. │ └─testthat:::expect_condition_matching(...)
   3. │   └─testthat:::quasi_capture(...)
   4. │     ├─testthat (local) .capture(...)
   5. │     │ └─base::withCallingHandlers(...)
   6. │     └─rlang::eval_bare(quo_get_expr(.quo), quo_get_env(.quo))
   7. └─testthat::expect_no_error(...)
  ── Error ('test-visOmopTable.R:16:3'): visOmopTable ────────────────────────────
  Error in `eval(code, test_env)`: object 'gt1' not found
  Backtrace:
      ▆
   1. ├─testthat::expect_true("gt_tbl" %in% class(gt1)) at test-visOmopTable.R:16:3
   2. │ └─testthat::quasi_label(enquo(object), label, arg = "object")
   3. │   └─rlang::eval_bare(expr, quo_get_env(quo))
   4. └─"gt_tbl" %in% class(gt1)
  ── Failure ('test-visOmopTable.R:153:3'): renameColumn works ───────────────────
  Expected `... <- NULL` to run without any errors.
  i Actually got a <packageNotFoundError> with text:
    there is no package called 'gt'
  Backtrace:
      ▆
   1. ├─testthat::expect_message(...) at test-visOmopTable.R:153:3
   2. │ └─testthat:::expect_condition_matching(...)
   3. │   └─testthat:::quasi_capture(...)
   4. │     ├─testthat (local) .capture(...)
   5. │     │ └─base::withCallingHandlers(...)
   6. │     └─rlang::eval_bare(quo_get_expr(.quo), quo_get_env(.quo))
   7. └─testthat::expect_no_error(...)
  ── Error ('test-visOmopTable.R:166:3'): renameColumn works ─────────────────────
  Error in `eval(code, test_env)`: object 'gt1' not found
  Backtrace:
      ▆
   1. ├─testthat::expect_true(...) at test-visOmopTable.R:166:3
   2. │ └─testthat::quasi_label(enquo(object), label, arg = "object")
   3. │   └─rlang::eval_bare(expr, quo_get_env(quo))
   4. └─base::colnames(gt1$`_data`)
   5.   └─base::is.data.frame(x)
  ── Error ('test-visOmopTable.R:248:5'): empty result ───────────────────────────
  <packageNotFoundError/error/condition>
  Error in `loadNamespace(x)`: there is no package called 'gt'
  Backtrace:
       ▆
    1. ├─testthat::expect_warning(...) at test-visOmopTable.R:247:3
    2. │ └─testthat:::expect_condition_matching(...)
    3. │   └─testthat:::quasi_capture(...)
    4. │     ├─testthat (local) .capture(...)
    5. │     │ └─base::withCallingHandlers(...)
    6. │     └─rlang::eval_bare(quo_get_expr(.quo), quo_get_env(.quo))
    7. ├─visOmopResults::visOmopTable(...) at test-visOmopTable.R:248:5
    8. │ └─visOmopResults::visTable(...)
    9. │   └─visOmopResults::formatTable(...)
   10. │     └─visOmopResults:::validateStyle(style, type)
   11. │       ├─base::eval(...)
   12. │       │ └─base::eval(...)
   13. │       └─visOmopResults:::gtStyleInternal(styleName = style)
   14. └─base::loadNamespace(x)
   15.   └─base::withRestarts(stop(cond), retry_loadNamespace = function() NULL)
   16.     └─base (local) withOneRestart(expr, restarts[[1L]])
   17.       └─base (local) doWithOneRestart(return(expr), restart)
  ── Error ('test-visOmopTable.R:263:3'): don't want scientific ──────────────────
  <packageNotFoundError/error/condition>
  Error in `loadNamespace(x)`: there is no package called 'gt'
  Backtrace:
       ▆
    1. ├─visOmopResults::visOmopTable(...) at test-visOmopTable.R:263:3
    2. │ └─visOmopResults::visTable(...)
    3. │   └─visOmopResults::formatTable(...)
    4. │     └─visOmopResults:::validateStyle(style, type)
    5. │       ├─base::eval(...)
    6. │       │ └─base::eval(...)
    7. │       └─visOmopResults:::gtStyleInternal(styleName = style)
    8. └─base::loadNamespace(x)
    9.   └─base::withRestarts(stop(cond), retry_loadNamespace = function() NULL)
   10.     └─base (local) withOneRestart(expr, restarts[[1L]])
   11.       └─base (local) doWithOneRestart(return(expr), restart)
  
  [ FAIL 18 | WARN 32 | SKIP 0 | PASS 272 ]
  Error: Test failures
  Execution halted