Running ‘testthat.R’ [8s/9s]
Running the tests in ‘tests/testthat.R’ failed.
Complete output:
  > library(testthat)
  > library(customLayout)
  > library(vdiffr)
  > 
  > on_appveyor <- function() {
  +   identical(Sys.getenv("APPVEYOR"), "True")
  + }
  > on_cran <- function() {
  +   !identical(Sys.getenv("NOT_CRAN"), "true")
  + }
  > 
  > # Use minimal fonts.conf to speed up fc-cache
  > if (on_appveyor() || on_cran()) {
  +   gdtools::set_dummy_conf()
  + }
  Loading required namespace: fontquiver
  [1] "/tmp/RtmptrAGEH/dummy_fontconfig/Vera.ttf"
  attr(,"font")
  [1] "Bitstream Vera Sans"
  attr(,"fullname")
  [1] "Bitstream Vera Sans"
  attr(,"index")
  [1] 0
  > 
  > 
  > test_check("customLayout")
  ── 1. Error: Basic grid (@test-basic.R#61)  ────────────────────────────────────
  VECTOR_ELT() can only be applied to a 'list', not a 'double'
  1: vdiffr::expect_doppelganger("basic grid layout", basic_grid_layout) at testthat/test-basic.R:61
  2: writer(fig, testcase, title)
  3: print_plot(plot, title)
  4: print_plot.function(plot, title)
  5: p()
  6: lay_grid(list(pl1, pl2, pl3, pl4), l3) at testthat/test-basic.R:57
  7: gridExtra::grid.arrange(grobs = grobs, layout_matrix = lay$mat, widths = lay$widths, 
         heights = lay$heights, ...)
  8: grid.draw(g)
  9: grid.draw.gTree(g)
  10: recordGraphics(drawGTree(x), list(x = x), getNamespace("grid"))
  ...
  19: pushgrobvp(x$vp)
  20: pushgrobvp.viewport(x$vp)
  21: pushViewport(vp, recording = FALSE)
  22: lapply(vps, push.vp, recording)
  23: FUN(X[[i]], ...)
  24: push.vp.vpStack(X[[i]], ...)
  25: lapply(vp, push.vp, recording)
  26: FUN(X[[i]], ...)
  27: push.vp.viewport(X[[i]], ...)
  28: grid.Call.graphics(C_setviewport, vp, TRUE)
  
  ── 2. Error: phl_with_gg works (@test-officer.R#37)  ───────────────────────────
  VECTOR_ELT() can only be applied to a 'list', not a 'double'
  1: phl_with_gg(pptx, offLayout, 2, plot1) at testthat/test-officer.R:37
  2: officer::ph_with_gg_at(x, value, width = olay[[id]]["width"], height = olay[[id]]["height"], 
         left = olay[[id]]["left"], top = olay[[id]]["top"], ...)
  3: ph_with(x, value, location = ph_location(ph = "", label = "", left = left, top = top, 
         width = width, height = height), ...)
  4: ph_with.gg(x, value, location = ph_location(ph = "", label = "", left = left, top = top, 
         width = width, height = height), ...)
  5: print(value)
  6: print.ggplot(value)
  7: grid.draw(gtable)
  8: grid.draw.gTree(gtable)
  9: recordGraphics(drawGTree(x), list(x = x), getNamespace("grid"))
  10: drawGTree(x)
  11: preDraw(x)
  12: preDraw.gTree(x)
  13: pushvpgp(x)
  14: pushgrobvp(x$vp)
  15: pushgrobvp.viewport(x$vp)
  16: pushViewport(vp, recording = FALSE)
  17: lapply(vps, push.vp, recording)
  18: FUN(X[[i]], ...)
  19: push.vp.viewport(X[[i]], ...)
  20: grid.Call.graphics(C_setviewport, vp, TRUE)
  
  ══ testthat results  ═══════════════════════════════════════════════════════════
  OK: 18 SKIPPED: 16 FAILED: 2
  1. Error: Basic grid (@test-basic.R#61) 
  2. Error: phl_with_gg works (@test-officer.R#37) 
  
  Error: testthat unit tests failed
  Execution halted