Running ‘testthat.R’ [188s/162s]
Running the tests in ‘tests/testthat.R’ failed.
Complete output:
  > library(testthat)
  > library(JSmediation)
  > 
  > test_check("JSmediation")
  Starting 2 test processes
  [ FAIL 1 | WARN 2 | SKIP 0 | PASS 88 ]
  
  ══ Failed tests ════════════════════════════════════════════════════════════════
  ── Error ('test-plot_assumptions.R:30:3'): check_assumptions_plot ──────────────
  <purrr_error_indexed/rlang_error/error/condition>
  Error in `map2(.x, .y, .f, ..., .progress = .progress)`: i In index: 1.
  i With name: X -> Y.
  Caused by error in `assumption_plot + patchwork::plot_annotation(title = title, subtitle = glue::glue(
      "Model formula: {model_formula}"), )`:
  ! non-numeric argument to binary operator
  Backtrace:
       ▆
    1. ├─testthat::expect_warning(...) at test-plot_assumptions.R:30: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. ├─JSmediation::plot_assumptions(...)
    8. ├─JSmediation:::plot_assumptions.mediation_model(...)
    9. │ └─purrr::pluck(mediation_model, "js_models") %>% ...
   10. ├─purrr::iwalk(...)
   11. │ └─purrr::walk2(.x, vec_index(.x), .f, ...)
   12. │   └─purrr::map2(.x, .y, .f, ..., .progress = .progress)
   13. │     └─purrr:::map2_("list", .x, .y, .f, ..., .progress = .progress)
   14. │       ├─purrr:::with_indexed_errors(...)
   15. │       │ └─base::withCallingHandlers(...)
   16. │       ├─purrr:::call_with_cleanup(...)
   17. │       └─JSmediation (local) .f(.x[[i]], .y[[i]], ...)
   18. │         ├─... %>% print()
   19. │         └─JSmediation:::check_model_plot(model = .x, title = .y, tests_to_perform = tests_to_perform)
   20. ├─base::print(.)
   21. └─base::.handleSimpleError(...)
   22.   └─purrr (local) h(simpleError(msg, call))
   23.     └─cli::cli_abort(...)
   24.       └─rlang::abort(...)
  
  [ FAIL 1 | WARN 2 | SKIP 0 | PASS 88 ]
  Deleting unused snapshots:
  • plot_assumptions/last-plot-plot-assumptions-produces.svg
  Error: Test failures
  Execution halted