Running 'testthat.R' [3s]
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(mtvc)
  > 
  > test_check("mtvc")
  [ FAIL 1 | WARN 0 | SKIP 0 | PASS 0 ]
  
  ══ Failed tests ════════════════════════════════════════════════════════════════
  ── Error ('test-mtvc.R:2:1'): (code run outside of `test_that()`) ──────────────
  <dplyr:::mutate_error/rlang_error/error/condition>
  Error in `mutate(.tbl, !!!funs)`: ℹ In argument: `FIRST_CHRONIC = (structure(function (..., .x = ..1, .y =
    ..2, . = ..1) ...`.
  Caused by error in `as.Date.numeric()`:
  ! 'origin' must be supplied
  Backtrace:
       ▆
    1. ├─mtvc::mtvc(...) at test-mtvc.R:2:1
    2. │ └─data %>% ungroup() %>% mutate(id = row_number()) %>% ...
    3. ├─dplyr::mutate_at(...)
    4. │ ├─dplyr::mutate(.tbl, !!!funs)
    5. │ └─dplyr:::mutate.data.frame(.tbl, !!!funs)
    6. │   └─dplyr:::mutate_cols(.data, dplyr_quosures(...), by)
    7. │     ├─base::withCallingHandlers(...)
    8. │     └─dplyr:::mutate_col(dots[[i]], data, mask, new_columns)
    9. │       └─mask$eval_all_mutate(quo)
   10. │         └─dplyr (local) eval()
   11. ├─mtvc (local) `<inln_cl_>`(FIRST_CHRONIC)
   12. │ └─rlang::eval_bare(`_quo`, base::parent.frame())
   13. ├─rlang (local) as.Date(ifelse(is.na(.), as.Date(origin), as.Date(.)))
   14. ├─base::as.Date(ifelse(is.na(.), as.Date(origin), as.Date(.)))
   15. ├─base::as.Date.numeric(ifelse(is.na(.), as.Date(origin), as.Date(.)))
   16. │ └─base::stop("'origin' must be supplied")
   17. └─base::.handleSimpleError(...)
   18.   └─dplyr (local) h(simpleError(msg, call))
   19.     └─rlang::abort(message, class = error_class, parent = parent, call = error_call)
  
  [ FAIL 1 | WARN 0 | SKIP 0 | PASS 0 ]
  Error: Test failures
  Execution halted