Running 'testthat.R' [28s]
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 20 | WARN 5 | SKIP 0 | PASS 255 ]
  
  ══ Failed tests ════════════════════════════════════════════════════════════════
  ── Error ('test-appendSettings.R:34:3'): appendSettings ────────────────────────
  Error in `dplyr::union_all(result, dplyr::mutate(result, result_id = as.integer(2), 
      package_name = "testing"))`: `x` and `y` are not compatible.
  x Different number of columns: 15 vs 16.
  Backtrace:
      ▆
   1. ├─dplyr::union_all(...) at test-appendSettings.R:34:3
   2. └─dplyr:::union_all.data.frame(result, dplyr::mutate(result, result_id = as.integer(2), package_name = "testing"))
   3.   └─dplyr:::check_compatible(x, y)
   4.     └─rlang::abort(c("`x` and `y` are not compatible.", compat), call = error_call)
  ── Error ('test-formatEstimateValue.R:209:5'): formatEstimateValue ─────────────
  Error in `dplyr::union_all(mockSummarisedResult(), dplyr::tibble(result_id = as.integer(1), 
      cdm_name = "mock", result_type = NA_character_, package_name = "visOmopResults", 
      package_version = as.character(utils::packageVersion("visOmopResults")), 
      group_name = "cohort_name", group_level = "cohort3", strata_name = rep(c("overall", 
          rep("age_group &&& sex", 4), rep("sex", 2), rep("age_group", 
              2)), 2), strata_level = rep(c("overall", "<40 &&& Male", 
          ">=40 &&& Male", "<40 &&& Female", ">=40 &&& Female", 
          "Male", "Female", "<40", ">=40"), 2), variable_name = "number subjects", 
      variable_level = NA_character_, estimate_name = "count", 
      estimate_type = "integer", estimate_value = NA_character_, 
      additional_name = "overall", additional_level = "overall"))`: `x` and `y` are not compatible.
  x Different number of columns: 13 vs 16.
  Backtrace:
      ▆
   1. ├─dplyr::union_all(...) at test-formatEstimateValue.R:209:5
   2. └─dplyr:::union_all.data.frame(...)
   3.   └─dplyr:::check_compatible(x, y)
   4.     └─rlang::abort(c("`x` and `y` are not compatible.", compat), call = error_call)
  ── Failure ('test-formatTable.R:4:3'): formatTable ─────────────────────────────
  Expected `... <- NULL` to run without any errors.
  i Actually got a <rlang_error> with text:
    i In argument: `dplyr::all_of(excludeColumns)`.
    Caused by error in `dplyr::all_of()`:
    ! Can't subset elements that don't exist.
    x Elements `result_type`, `package_name`, and `package_version` don't exist.
  ── Error ('test-formatTable.R:17:3'): formatTable ──────────────────────────────
  Error in `eval(code, test_env)`: object 'gt1' not found
  Backtrace:
      ▆
   1. ├─testthat::expect_true("gt_tbl" %in% class(gt1)) at test-formatTable.R:17: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-fxTable.R:45:3'): fxTable ────────────────────────────────────
  unique(fxResult$body$dataset$result_type) (`actual`) not equal to "mock_summarised_result" (`expected`).
  
  `actual` is NULL
  `expected` is a character vector ('mock_summarised_result')
  ── Error ('test-fxTable.R:56:3'): fxTable ──────────────────────────────────────
  <subscriptOutOfBoundsError/error/condition>
  Error in `fxResult$body$styles$pars$text.align$data[1, 12:29]`: subscript out of bounds
  Backtrace:
      ▆
   1. ├─testthat::expect_equal(...) at test-fxTable.R:56:3
   2. │ └─testthat::quasi_label(enquo(object), label, arg = "object")
   3. │   └─rlang::eval_bare(expr, quo_get_env(quo))
   4. └─base::unique(fxResult$body$styles$pars$text.align$data[1, 12:29])
  ── Failure ('test-fxTable.R:284:3'): fxTable, test colsToMergeRows ─────────────
  fxResult$body$styles$cells$border.color.top$data[, 7] (`actual`) not equal to c(...) (`expected`).
  
       actual | expected               
   [1] "gray" | "gray"   [1]           
   [2] "gray" | "gray"   [2]           
   [3] "gray" | "gray"   [3]           
   [4] "gray" - "black"  [4]           
   [5] "gray" | "gray"   [5]           
   [6] "gray" - "black"  [6]           
   [7] "gray" - "black"  [7]           
   [8] "gray" - "black"  [8]           
   [9] "gray" | "gray"   [9]           
  [10] "gray" | "gray"   [10]          
   ... ...      ...      and 6 more ...
  ── Failure ('test-fxTable.R:287:3'): fxTable, test colsToMergeRows ─────────────
  fxResult$body$styles$cells$border.color.top$data[, 8] (`actual`) not equal to c(...) (`expected`).
  
       actual | expected               
   [1] "gray" | "gray"   [1]           
   [2] "gray" | "gray"   [2]           
   [3] "gray" | "gray"   [3]           
   [4] "gray" - "black"  [4]           
   [5] "gray" | "gray"   [5]           
   [6] "gray" - "black"  [6]           
   [7] "gray" | "gray"   [7]           
   [8] "gray" - "black"  [8]           
   [9] "gray" | "gray"   [9]           
  [10] "gray" | "gray"   [10]          
   ... ...      ...      and 6 more ...
  ── Error ('test-fxTable.R:290:3'): fxTable, test colsToMergeRows ───────────────
  <subscriptOutOfBoundsError/error/condition>
  Error in `fxResult$body$styles$cells$border.color.top$data[, 19]`: subscript out of bounds
  Backtrace:
      ▆
   1. └─testthat::expect_equal(...) at test-fxTable.R:290:3
   2.   └─testthat::quasi_label(enquo(object), label, arg = "object")
   3.     └─rlang::eval_bare(expr, quo_get_env(quo))
  ── Failure ('test-gtTable.R:57:3'): gtTable ────────────────────────────────────
  ... == "bold" is not TRUE
  
  `actual`:   TRUE <NA>
  `expected`: TRUE     
  ── Failure ('test-gtTable.R:111:3'): gtTable ───────────────────────────────────
  ... == 11 is not TRUE
  
  `actual`:   FALSE
  `expected`: TRUE 
  ── Failure ('test-gtTable.R:193:3'): gtTable, test default styles and NULL ─────
  gtResult$`_styles`$styles[203][[1]]$cell_text$align == "left" is not TRUE
  
  `actual`:       
  `expected`: TRUE
  ── Failure ('test-gtTable.R:232:3'): gtTable, test default styles and NULL ─────
  unique(...) (`actual`) not equal to c("center", "bold") (`expected`).
  
  `actual`:   "center" "bold" NA
  `expected`: "center" "bold"   
  ── Failure ('test-gtTable.R:276:3'): gtTable, test colsToMergeRows ─────────────
  gtResult$`_data`$result_type (`actual`) not equal to c(...) (`expected`).
  
  `actual` is NULL
  `expected` is a character vector ('mock_summarised_result', '', '', '', '', ...)
  ── Failure ('test-gtTable.R:299:3'): gtTable, test colsToMergeRows ─────────────
  gtResult$`_data`$result_type (`actual`) not equal to rep("mock_summarised_result", 14) (`expected`).
  
  `actual` is NULL
  `expected` is a character vector ('mock_summarised_result', 'mock_summarised_result', 'mock_summarised_result', 'mock_summarised_result', 'mock_summarised_result', ...)
  ── Failure ('test-gtTable.R:322:3'): gtTable, test colsToMergeRows ─────────────
  gtResult$`_data`$result_type (`actual`) not equal to c(...) (`expected`).
  
  `actual` is NULL
  `expected` is a character vector ('mock_summarised_result', '', '', '', '', ...)
  ── Error ('test-pivotSettings.R:2:3'): pivotSettings ───────────────────────────
  Error in `dplyr::union_all(mockSummarisedResult()[1, ], dplyr::tibble(result_id = as.integer(1), 
      cdm_name = "mock", result_type = "mock_summarised_result", 
      package_name = "visOmopResults", package_version = as.character(utils::packageVersion("visOmopResults")), 
      group_name = "overall", group_level = "overall", strata_name = "overall", 
      strata_level = "overall", variable_name = "settings", variable_level = NA_character_, 
      estimate_name = "mock_default", estimate_type = "logical", 
      estimate_value = "TRUE", additional_name = "overall", additional_level = "overall"))`: `x` and `y` are not compatible.
  x Different number of columns: 13 vs 16.
  Backtrace:
      ▆
   1. ├─dplyr::union_all(...) at test-pivotSettings.R:2:3
   2. └─dplyr:::union_all.data.frame(...)
   3.   └─dplyr:::check_compatible(x, y)
   4.     └─rlang::abort(c("`x` and `y` are not compatible.", compat), call = error_call)
  ── Error ('test-tidy.R:2:3'): tidy ─────────────────────────────────────────────
  Error in `dplyr::union_all(mockSummarisedResult(), dplyr::tibble(result_id = as.integer(1), 
      cdm_name = "mock", result_type = "mock_summarised_result", 
      package_name = "visOmopResults", package_version = as.character(utils::packageVersion("visOmopResults")), 
      group_name = "overall", group_level = "overall", strata_name = "overall", 
      strata_level = "overall", variable_name = "settings", variable_level = NA_character_, 
      estimate_name = "mock_default", estimate_type = "logical", 
      estimate_value = "TRUE", additional_name = "overall", additional_level = "overall"))`: `x` and `y` are not compatible.
  x Different number of columns: 13 vs 16.
  Backtrace:
      ▆
   1. ├─dplyr::union_all(...) at test-tidy.R:2:3
   2. └─dplyr:::union_all.data.frame(...)
   3.   └─dplyr:::check_compatible(x, y)
   4.     └─rlang::abort(c("`x` and `y` are not compatible.", compat), call = error_call)
  ── Failure ('test-tidy.R:118:3'): tidy, dates ──────────────────────────────────
  Expected `result_out <- tidy(result)` to run without any errors.
  i Actually got a <rlang_error> with text:
    Join columns in `x` must be present in the data.
    x Problem with `result_type`.
  ── Error ('test-tidy.R:119:3'): tidy, dates ────────────────────────────────────
  Error in `eval(code, test_env)`: object 'result_out' not found
  Backtrace:
      ▆
   1. ├─testthat::expect_true(...) at test-tidy.R:119:3
   2. │ └─testthat::quasi_label(enquo(object), label, arg = "object")
   3. │   └─rlang::eval_bare(expr, quo_get_env(quo))
   4. ├─base::as.Date(dplyr::pull(result_out, date))
   5. └─dplyr::pull(result_out, date)
  
  [ FAIL 20 | WARN 5 | SKIP 0 | PASS 255 ]
  Error: Test failures
  Execution halted