Expected `... <- NULL` to run without any errors.
i Actually got a <simpleError> with text:
  unused argument (minFutureObservation = NULL)

Error in `eval(code, test_env)`: object 'resAllD' not found

Error in `CohortConstructor::demographicsCohort(cdm, name = paste0(tablePrefix, 
    "demographics_table"), sex = NULL, ageRange = ageGroup, minPriorObservation = NULL, 
    minFutureObservation = NULL)`: unused argument (minFutureObservation = NULL)

Error in `eval(code, test_env)`: object 'resStrata' not found

`... <- NULL` did not throw the expected warning.

dplyr::filter(variable_name == "Number records") |>
dplyr::filter(variable_name == "Cohort start date" & estimate_name == "min") |>
dplyr::filter(variable_name == "Age at end") |>
dplyr::filter(variable_name == "Cohort end date" & estimate_name == "max") |>
c("age_group_at_start", "age_group_at_start &&& sex", "overall", "sex")))
dplyr::filter(variable_name == "Age at end" & strata_level == "0 to 20" & estimate_name == "min") |>
dplyr::filter(variable_name == "Age at end" & strata_level == "21 to 150" & estimate_name == "min") |>
expect_error(summarisePopulationCharacteristics(cdm, studyPeriod = c("2000-01-01", "1990-01-01")))
expect_error(summarisePopulationCharacteristics(cdm, studyPeriod = c(NA, "1990-51-01")))
expect_error(summarisePopulationCharacteristics(cdm, studyPeriod = c("01/31/1990", "2000-01-01")))
expect_error(summarisePopulationCharacteristics(cdm, studyPeriod = NULL, sex = "Female"))
expect_error(summarisePopulationCharacteristics(cdm, studyPeriod = NULL, ageGroup = c(0,20,40)))
x <- x |> dplyr::filter(.data$result_id == -1)
test_that("summarisePopulationCharacteristics() works with mockOmopSKetch", {
cdm <- mockOmopSketch(numberIndividuals = 2, seed = 1)
dplyr::filter(variable_name == "Age at end", estimate_name == "median") |>
dplyr::filter(variable_name == "Sex", estimate_name == "percentage") |>
dplyr::filter(variable_name == "Age at start", estimate_name %in% c("min","max")) |>

`summarisedPopulation <- summarisePopulationCharacteristics(cdm = cdm)` did not throw the expected warning.