Running ‘spelling.R’
  Running ‘testthat.R’ [115s/68s]
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/tests.html
  > # * https://testthat.r-lib.org/reference/test_package.html#special-files
  > 
  > library(testthat)
  > library(CohortCharacteristics)
  > 
  > test_check("CohortCharacteristics")
  Starting 2 test processes
  [ FAIL 3 | WARN 0 | SKIP 11 | PASS 82 ]
  
  ══ Skipped tests (11) ══════════════════════════════════════════════════════════
  • On CRAN (10): 'test-plotCharacteristics.R:2:3',
    'test-plotLargeScaleCharacteristics.R:3:3', 'test-plotSummarised.R:2:3',
    'test-plotSummarised.R:91:3', 'test-plotSummarised.R:197:3',
    'test-plotSummarised.R:299:3',
    'test-summariseLargeScaleCharacteristics.R:2:3',
    'test-tableSummarised.R:2:3', 'test-tableSummarised.R:123:3',
    'test-summariseCharacteristics.R:1122:3'
  • empty test (1): 'test-tableSummarised.R:262:1'
  
  ══ Failed tests ════════════════════════════════════════════════════════════════
  ── Error ('test-summariseCharacteristics.R:53:3'): test summariseCharacteristics ──
  Error in `mockCohortCharacteristics(connectionDetails, dus_cohort = dus_cohort, 
      person = person, comorbidities = comorbidities, medication = medication, 
      observation_period = observation_period, cohort1 = emptyCohort, 
      cohort2 = emptyCohort)`: ! `con` must be a DBI connection
  Backtrace:
      ▆
   1. └─PatientProfiles (local) mockCohortCharacteristics(...) at test-summariseCharacteristics.R:53:3
   2.   └─cli::cli_abort(c(`!` = "`con` must be a DBI connection"))
   3.     └─rlang::abort(...)
  ── Error ('test-summariseCharacteristics.R:378:3'): test empty cohort ──────────
  Error in `mockCohortCharacteristics(connectionDetails = connectionDetails)`: tables must be a list; it can not contain NA; it can not be NULL; it has to be named; elements must have class: data.frame.
  Backtrace:
      ▆
   1. └─PatientProfiles (local) mockCohortCharacteristics(connectionDetails = connectionDetails) at test-summariseCharacteristics.R:378:3
   2.   └─PatientProfiles:::assertList(tables, named = TRUE, class = "data.frame")
   3.     └─cli::cli_abort(errorMessage, call = call)
   4.       └─rlang::abort(...)
  ── Error ('test-summariseCharacteristics.R:484:3'): test cohort id ─────────────
  Error in `mockCohortCharacteristics(connectionDetails, dus_cohort = dus_cohort, 
      person = person, comorbidities = comorbidities, medication = medication, 
      observation_period = observation_period, cohort1 = emptyCohort, 
      cohort2 = emptyCohort)`: ! `con` must be a DBI connection
  Backtrace:
      ▆
   1. └─PatientProfiles (local) mockCohortCharacteristics(...) at test-summariseCharacteristics.R:484:3
   2.   └─cli::cli_abort(c(`!` = "`con` must be a DBI connection"))
   3.     └─rlang::abort(...)
  
  [ FAIL 3 | WARN 0 | SKIP 11 | PASS 82 ]
  Error: Test failures
  Execution halted