Running ‘testthat.R’ [67s/73s]
Running the tests in ‘tests/testthat.R’ failed.
Complete output:
  > library(testthat)
  > library(evaluator)
  > 
  > test_check("evaluator")
  ── 1. Error: Analyze report renders (@test-reports.R#35)  ─────────────────
  VECTOR_ELT() can only be applied to a 'list', not a 'double'
  1: evaluate_promise(generate_report(input_directory = tmpinputs, results_directory = tmpdata, 
         output_file = file, quiet = FALSE)) at testthat/test-reports.R:35
  2: withr::with_output_sink(temp, withCallingHandlers(withVisible(code), warning = handle_warning, 
         message = handle_message))
  3: force(code)
  4: withCallingHandlers(withVisible(code), warning = handle_warning, message = handle_message)
  5: withVisible(code)
  6: generate_report(input_directory = tmpinputs, results_directory = tmpdata, output_file = file, 
         quiet = FALSE)
  7: rmarkdown::render(system.file("rmd", "analyze_risk.Rmd", package = "evaluator"), 
         output_file = output_file, intermediates_dir = intermediates_dir, params = list(input_directory = input_directory, 
             results_directory = results_directory, focus_scenario_ids = focus_scenario_ids), 
         output_format = out_format, quiet = quiet, ...)
  8: knitr::knit(knit_input, knit_output, envir = envir, quiet = quiet, encoding = encoding)
  9: process_file(text, output)
  10: withCallingHandlers(if (tangle) process_tangle(group) else process_group(group), 
         error = function(e) {
             setwd(wd)
             cat(res, sep = "\n", file = output %n% "")
             message("Quitting from lines ", paste(current_lines(i), collapse = "-"), 
                 " (", knit_concord$get("infile"), ") ")
         })
  ...
  34: preDraw(x)
  35: preDraw.gTree(x)
  36: pushvpgp(x)
  37: pushgrobvp(x$vp)
  38: pushgrobvp.viewport(x$vp)
  39: pushViewport(vp, recording = FALSE)
  40: lapply(vps, push.vp, recording)
  41: FUN(X[[i]], ...)
  42: push.vp.viewport(X[[i]], ...)
  43: grid.Call.graphics(C_setviewport, vp, TRUE)
  
  ── 2. Error: Risk Dashboard renders (@test-reports.R#65)  ─────────────────
  VECTOR_ELT() can only be applied to a 'list', not a 'double'
  1: evaluate_promise(risk_dashboard(input_directory = tmpinputs, results_directory = tmpdata, 
         output_file = file, quiet = FALSE)) at testthat/test-reports.R:65
  2: withr::with_output_sink(temp, withCallingHandlers(withVisible(code), warning = handle_warning, 
         message = handle_message))
  3: force(code)
  4: withCallingHandlers(withVisible(code), warning = handle_warning, message = handle_message)
  5: withVisible(code)
  6: risk_dashboard(input_directory = tmpinputs, results_directory = tmpdata, output_file = file, 
         quiet = FALSE)
  7: rmarkdown::render(system.file("rmd", "risk_dashboard.Rmd", package = "evaluator"), 
         output_options = list(css = styles, favicon = icon, logo = icon), output_file = output_file, 
         intermediates_dir = intermediates_dir, params = list(input_directory = input_directory, 
             results_directory = results_directory), quiet = quiet, ...)
  8: knitr::knit(knit_input, knit_output, envir = envir, quiet = quiet, encoding = encoding)
  9: process_file(text, output)
  10: withCallingHandlers(if (tangle) process_tangle(group) else process_group(group), 
         error = function(e) {
             setwd(wd)
             cat(res, sep = "\n", file = output %n% "")
             message("Quitting from lines ", paste(current_lines(i), collapse = "-"), 
                 " (", knit_concord$get("infile"), ") ")
         })
  ...
  34: preDraw(x)
  35: preDraw.gTree(x)
  36: pushvpgp(x)
  37: pushgrobvp(x$vp)
  38: pushgrobvp.viewport(x$vp)
  39: pushViewport(vp, recording = FALSE)
  40: lapply(vps, push.vp, recording)
  41: FUN(X[[i]], ...)
  42: push.vp.viewport(X[[i]], ...)
  43: grid.Call.graphics(C_setviewport, vp, TRUE)
  
  ══ testthat results  ═══════════════════════════════════════════════════════════
  OK: 84 SKIPPED: 5 FAILED: 2
  1. Error: Analyze report renders (@test-reports.R#35) 
  2. Error: Risk Dashboard renders (@test-reports.R#65) 
  
  Error: testthat unit tests failed
  Execution halted