Running 'testthat.R'
Running the tests in 'tests/testthat.R' failed.
Complete output:
  > library(testthat)
  > library(checkmate)
  > library(gt)
  
  Attaching package: 'gt'
  
  The following object is masked from 'package:testthat':
  
      matches
  
  > 
  > test_check("gt")
  ══ Skipped tests ═══════════════════════════════════════════════════════════════
  • On CRAN (2)
  • rvest cannot be loaded (16)
  
  ══ Failed tests ════════════════════════════════════════════════════════════════
  ── Error (test-data_color.R:45:3): the correct color values are obtained when defining a palette ──
  Error: there is no package called 'xml2'
  Backtrace:
      █
   1. ├─`%>%`(...) test-data_color.R:45:2
   2. └─base::loadNamespace(x)
   3.   └─base::withRestarts(stop(cond), retry_loadNamespace = function() NULL)
   4.     └─base:::withOneRestart(expr, restarts[[1L]])
   5.       └─base:::doWithOneRestart(return(expr), restart)
  ── Error (test-data_color.R:658:3): the correct color values are obtained when using a color fn ──
  Error: there is no package called 'xml2'
  Backtrace:
      █
   1. ├─`%>%`(...) test-data_color.R:658:2
   2. └─base::loadNamespace(x)
   3.   └─base::withRestarts(stop(cond), retry_loadNamespace = function() NULL)
   4.     └─base:::withOneRestart(expr, restarts[[1L]])
   5.       └─base:::doWithOneRestart(return(expr), restart)
  ── Error (test-data_color.R:1427:3): the `cell_fill()` function accepts colors of various types ──
  Error: there is no package called 'xml2'
  Backtrace:
      █
   1. ├─`%>%`(...) test-data_color.R:1427:2
   2. └─base::loadNamespace(x)
   3.   └─base::withRestarts(stop(cond), retry_loadNamespace = function() NULL)
   4.     └─base:::withOneRestart(expr, restarts[[1L]])
   5.       └─base:::doWithOneRestart(return(expr), restart)
  ── Error (test-gt_object.R:289:3): gt table can be made with grouped data -- one group ──
  Error: there is no package called 'xml2'
  Backtrace:
      █
   1. ├─`%>%`(...) test-gt_object.R:289:2
   2. └─base::loadNamespace(x)
   3.   └─base::withRestarts(stop(cond), retry_loadNamespace = function() NULL)
   4.     └─base:::withOneRestart(expr, restarts[[1L]])
   5.       └─base:::doWithOneRestart(return(expr), restart)
  ── Error (test-gt_object.R:373:3): gt table can be made with grouped data - two groups ──
  Error: there is no package called 'xml2'
  Backtrace:
      █
   1. ├─`%>%`(...) test-gt_object.R:373:2
   2. └─base::loadNamespace(x)
   3.   └─base::withRestarts(stop(cond), retry_loadNamespace = function() NULL)
   4.     └─base:::withOneRestart(expr, restarts[[1L]])
   5.       └─base:::doWithOneRestart(return(expr), restart)
  ── Error (test-gt_object.R:475:3): The `gt()` groupname_col arg will override any grouped data ──
  Error: there is no package called 'xml2'
  Backtrace:
      █
   1. ├─`%>%`(...) test-gt_object.R:475:2
   2. └─base::loadNamespace(x)
   3.   └─base::withRestarts(stop(cond), retry_loadNamespace = function() NULL)
   4.     └─base:::withOneRestart(expr, restarts[[1L]])
   5.       └─base:::doWithOneRestart(return(expr), restart)
  ── Error (test-gt_object.R:560:3): The `gt()` `rowname_col` arg will be overridden by `rownames_to_stub = TRUE` ──
  Error: there is no package called 'xml2'
  Backtrace:
      █
   1. ├─`%>%`(...) test-gt_object.R:560:2
   2. └─base::loadNamespace(x)
   3.   └─base::withRestarts(stop(cond), retry_loadNamespace = function() NULL)
   4.     └─base:::withOneRestart(expr, restarts[[1L]])
   5.       └─base:::doWithOneRestart(return(expr), restart)
  ── Error (test-gt_object.R:630:3): The `rowname` column will be safely included when `rownames_to_stub = TRUE` ──
  Error: there is no package called 'xml2'
  Backtrace:
      █
   1. ├─`%>%`(...) test-gt_object.R:630:2
   2. └─base::loadNamespace(x)
   3.   └─base::withRestarts(stop(cond), retry_loadNamespace = function() NULL)
   4.     └─base:::withOneRestart(expr, restarts[[1L]])
   5.       └─base:::doWithOneRestart(return(expr), restart)
  ── Error (test-r_table_parts.R:78:3): a gt table contains the expected column spanner labels ──
  Error: there is no package called 'xml2'
  Backtrace:
       █
    1. ├─`%>%`(...) test-r_table_parts.R:78:2
    2. ├─testthat::expect_true(.)
    3. │ └─testthat::quasi_label(enquo(object), label, arg = "object")
    4. │   └─rlang::eval_bare(expr, quo_get_env(quo))
    5. ├─base::grepl(...)
    6. │ └─base::is.factor(x)
    7. ├─tbl_rtf %>% as_rtf() %>% as.character()
    8. ├─gt::as_rtf(.)
    9. │ └─gt:::create_footnotes_component_rtf(data = data)
   10. │   └─base::vapply(...)
   11. │     └─gt:::FUN(X[[i]], ...)
   12. │       └─`%>%`(...)
   13. ├─base::vapply(...)
   14. │ └─gt:::FUN(X[[i]], ...)
   15. └─base::loadNamespace(x)
   16.   └─base::withRestarts(stop(cond), retry_loadNamespace = function() NULL)
   17.     └─base:::withOneRestart(expr, restarts[[1L]])
   18.       └─base:::doWithOneRestart(return(expr), restart)
  ── Error (test-row_group_order.R:82:3): styling at various locations is kept when using `row_group_order()` ──
  Error: there is no package called 'xml2'
  Backtrace:
      █
   1. ├─`%>%`(...) test-row_group_order.R:82:2
   2. └─base::loadNamespace(x)
   3.   └─base::withRestarts(stop(cond), retry_loadNamespace = function() NULL)
   4.     └─base:::withOneRestart(expr, restarts[[1L]])
   5.       └─base:::doWithOneRestart(return(expr), restart)
  ── Error (test-tab_footnote.R:710:3): the footnotes table is structured correctly ──
  Error: there is no package called 'xml2'
  Backtrace:
      █
   1. ├─data_4 %>% render_as_html() %>% xml2::read_html() test-tab_footnote.R:710:2
   2. └─base::loadNamespace(x)
   3.   └─base::withRestarts(stop(cond), retry_loadNamespace = function() NULL)
   4.     └─base:::withOneRestart(expr, restarts[[1L]])
   5.       └─base:::doWithOneRestart(return(expr), restart)
  ── Error (test-tab_spanner_delim.R:319:3): `tab_spanner_delim()` gathers columns as necessary ──
  Error: there is no package called 'rvest'
  Backtrace:
      █
   1. ├─`%>%`(...) test-tab_spanner_delim.R:319:2
   2. ├─testthat::expect_equal(., c("A", "B"))
   3. │ └─testthat::quasi_label(enquo(object), label, arg = "object")
   4. │   └─rlang::eval_bare(expr, quo_get_env(quo))
   5. └─base::loadNamespace(x)
   6.   └─base::withRestarts(stop(cond), retry_loadNamespace = function() NULL)
   7.     └─base:::withOneRestart(expr, restarts[[1L]])
   8.       └─base:::doWithOneRestart(return(expr), restart)
  ── Error (test-text_transform.R:242:3): `text_transform()` works in the body even when rows/columns are reordered ──
  Error: there is no package called 'rvest'
  Backtrace:
       █
    1. ├─`%>%`(...) test-text_transform.R:242:2
    2. ├─testthat::expect_equal(., c("22.8!", "21.4", "18.7", "21", "21"))
    3. │ └─testthat::quasi_label(enquo(object), label, arg = "object")
    4. │   └─rlang::eval_bare(expr, quo_get_env(quo))
    5. ├─gt:::selection_text(., "tr td:nth-child(2)")
    6. │ └─html %>% rvest::html_nodes(selection) %>% rvest::html_text() test-text_transform.R:23:2
    7. └─base::loadNamespace(x)
    8.   └─base::withRestarts(stop(cond), retry_loadNamespace = function() NULL)
    9.     └─base:::withOneRestart(expr, restarts[[1L]])
   10.       └─base:::doWithOneRestart(return(expr), restart)
  ── Error (test-text_transform.R:310:3): `text_transform()` works in column labels ──
  Error: there is no package called 'rvest'
  Backtrace:
       █
    1. ├─`%>%`(...) test-text_transform.R:310:2
    2. ├─testthat::expect_equal(...)
    3. │ └─testthat::quasi_label(enquo(object), label, arg = "object")
    4. │   └─rlang::eval_bare(expr, quo_get_env(quo))
    5. ├─gt:::selection_text(., "th")
    6. │ └─html %>% rvest::html_nodes(selection) %>% rvest::html_text() test-text_transform.R:23:2
    7. └─base::loadNamespace(x)
    8.   └─base::withRestarts(stop(cond), retry_loadNamespace = function() NULL)
    9.     └─base:::withOneRestart(expr, restarts[[1L]])
   10.       └─base:::doWithOneRestart(return(expr), restart)
  ── Error (test-text_transform.R:346:3): `text_transform()` works on row labels in the stub ──
  Error: there is no package called 'rvest'
  Backtrace:
       █
    1. ├─`%>%`(...) test-text_transform.R:346:2
    2. ├─testthat::expect_equal(...)
    3. │ └─testthat::quasi_label(enquo(object), label, arg = "object")
    4. │   └─rlang::eval_bare(expr, quo_get_env(quo))
    5. ├─gt:::selection_text(., "[class='gt_row gt_left gt_stub']")
    6. │ └─html %>% rvest::html_nodes(selection) %>% rvest::html_text() test-text_transform.R:23:2
    7. └─base::loadNamespace(x)
    8.   └─base::withRestarts(stop(cond), retry_loadNamespace = function() NULL)
    9.     └─base:::withOneRestart(expr, restarts[[1L]])
   10.       └─base:::doWithOneRestart(return(expr), restart)
  ── Error (test-utils.R:12:3): basic markdown_to_rtf works ──────────────────────
  Error: there is no package called 'xml2'
  Backtrace:
       █
    1. ├─gt:::md_rtf("1. First item\n2. Second item\n3. Third item", "\\pard\\intbl\\itap1\\li300\\fi-300 \\ls1\\ilvl0\\cf0 \n{\\listtext\t}First item\\\n{\\listtext\t}Second item\\\n{\\listtext\t}Third item\\\n") test-utils.R:12:2
    2. │ ├─testthat::expect_equal(markdown_to_rtf(md), unclass(rtf_raw(rtf))) test-utils.R:2:2
    3. │ │ └─testthat::quasi_label(enquo(object), label, arg = "object")
    4. │ │   └─rlang::eval_bare(expr, quo_get_env(quo))
    5. │ └─gt:::markdown_to_rtf(md)
    6. │   └─`%>%`(...)
    7. ├─base::vapply(...)
    8. │ └─gt:::FUN(X[[i]], ...)
    9. └─base::loadNamespace(x)
   10.   └─base::withRestarts(stop(cond), retry_loadNamespace = function() NULL)
   11.     └─base:::withOneRestart(expr, restarts[[1L]])
   12.       └─base:::doWithOneRestart(return(expr), restart)
  ── Error (test-utils.R:147:3): markdown_to_rtf escaping ────────────────────────
  Error: there is no package called 'xml2'
  Backtrace:
       █
    1. ├─gt:::md_rtf("\\b{}", "\\'5cb\\'7b\\'7d") test-utils.R:147:2
    2. │ ├─testthat::expect_equal(markdown_to_rtf(md), unclass(rtf_raw(rtf))) test-utils.R:2:2
    3. │ │ └─testthat::quasi_label(enquo(object), label, arg = "object")
    4. │ │   └─rlang::eval_bare(expr, quo_get_env(quo))
    5. │ └─gt:::markdown_to_rtf(md)
    6. │   └─`%>%`(...)
    7. ├─base::vapply(...)
    8. │ └─gt:::FUN(X[[i]], ...)
    9. └─base::loadNamespace(x)
   10.   └─base::withRestarts(stop(cond), retry_loadNamespace = function() NULL)
   11.     └─base:::withOneRestart(expr, restarts[[1L]])
   12.       └─base:::doWithOneRestart(return(expr), restart)
  
  [ FAIL 17 | WARN 0 | SKIP 18 | PASS 1739 ]
  Error: Test failures
  Execution halted