Running ‘testthat.R’ [302s/161s]
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(DrugUtilisation)
  > 
  > test_check("DrugUtilisation")
  Starting 2 test processes
  [ FAIL 4 | WARN 86 | SKIP 50 | PASS 70 ]
  
  ══ Skipped tests (50) ══════════════════════════════════════════════════════════
  • On CRAN (50): 'test-addDrugUtilisation.R:3:3',
    'test-addDrugUtilisation.R:156:3', 'test-addDrugUtilisation.R:196:3',
    'test-benchmarkDrugUtilisation.R:2:3', 'test-dailyDose.R:2:3',
    'test-generateDrugUtilisationCohortSet.R:2:3',
    'test-generateDrugUtilisationCohortSet.R:23:3',
    'test-generatedAtcCohortSet.R:2:3',
    'test-generatedIngredientCohortSet.R:2:3',
    'test-generatedIngredientCohortSet.R:39:3',
    'test-generatedIngredientCohortSet.R:54:3',
    'test-generatedIngredientCohortSet.R:69:3',
    'test-generatedIngredientCohortSet.R:98:3', 'test-drugUse.R:2:3',
    'test-drugUse.R:42:3', 'test-drugUse.R:259:3', 'test-drugUse.R:463:3',
    'test-drugUse.R:608:3', 'test-drugUse.R:860:3', 'test-drugUse.R:883:3',
    'test-drugUse.R:932:3', 'test-drugUse.R:967:3', 'test-drugUse.R:1025:3',
    'test-patterns.R:2:3', 'test-plotProportionOfPatientsCovered.R:2:3',
    'test-plotProportionOfPatientsCovered.R:58:3',
    'test-plotProportionOfPatientsCovered.R:100:3', 'test-plotTreatment.R:2:3',
    'test-plots.R:2:3', 'test-readConceptList.R:2:3', 'test-require.R:2:3',
    'test-require.R:143:3', 'test-require.R:324:3', 'test-require.R:432:3',
    'test-require.R:526:3', 'test-require.R:597:3', 'test-indication.R:2:3',
    'test-indication.R:202:3', 'test-indication.R:355:3',
    'test-indication.R:472:3',
    'test-summariseProportionOfPatientsCovered.R:94:3',
    'test-summariseProportionOfPatientsCovered.R:170:3',
    'test-summariseProportionOfPatientsCovered.R:277:3',
    'test-summariseProportionOfPatientsCovered.R:497:3',
    'test-summariseProportionOfPatientsCovered.R:550:3', 'test-tables.R:2:3',
    'test-tables.R:132:3', 'test-tables.R:271:3', 'test-tables.R:393:3',
    'test-tables.R:502:3'
  
  ══ Failed tests ════════════════════════════════════════════════════════════════
  ── Failure ('test-summariseTreatment.R:11:3'): test summariseTreatment ─────────
  all(...) is not TRUE
  
  `actual`:   FALSE
  `expected`: TRUE 
  ── Failure ('test-summariseTreatment.R:35:3'): test summariseTreatment ─────────
  Expected `... <- NULL` to run without any errors.
  i Actually got a <rlang_error> with text:
    some of the cohort ids given do not exist in the cohortSet of cdm[[targetCohortName]]
  ── Failure ('test-summariseTreatment.R:44:3'): test summariseTreatment ─────────
  all(unique(x$variable_name) == c("cohort_2", "cohort_3", "untreated")) is not TRUE
  
  `actual`:   FALSE
  `expected`: TRUE 
  ── Failure ('test-summariseTreatment.R:45:3'): test summariseTreatment ─────────
  all(unique(x$additional_level) == c("0 to 30", "31 to 365")) is not TRUE
  
  `actual`:   FALSE
  `expected`: TRUE 
  
  [ FAIL 4 | WARN 86 | SKIP 50 | PASS 70 ]
  Error: Test failures
  Execution halted