dplyr::as_tibble(omopgenerics::tidy(res)) (`actual`) not identical to `expected` (`expected`).

actual vs expected
                           cdm_name
- actual[1, ]   PatientProfilesMock
+ expected[1, ] PP_MOCK            
- actual[2, ]   PatientProfilesMock
+ expected[2, ] PP_MOCK            
- actual[3, ]   PatientProfilesMock
+ expected[3, ] PP_MOCK            
- actual[4, ]   PatientProfilesMock
+ expected[4, ] PP_MOCK            
- actual[5, ]   PatientProfilesMock
+ expected[5, ] PP_MOCK            
- actual[6, ]   PatientProfilesMock
+ expected[6, ] PP_MOCK            
- actual[7, ]   PatientProfilesMock
+ expected[7, ] PP_MOCK            

    actual$cdm_name       | expected$cdm_name    
[1] "PatientProfilesMock" - "PP_MOCK"         [1]
[2] "PatientProfilesMock" - "PP_MOCK"         [2]
[3] "PatientProfilesMock" - "PP_MOCK"         [3]
[4] "PatientProfilesMock" - "PP_MOCK"         [4]
[5] "PatientProfilesMock" - "PP_MOCK"         [5]
[6] "PatientProfilesMock" - "PP_MOCK"         [6]
[7] "PatientProfilesMock" - "PP_MOCK"         [7]

test_that("test summarise cohortCodelist attribute", {
expect_no_error(res <- summariseCohortCodelist(cohort = cdm$cohort1))
cohort_definition_id = 1L, subject_id = 1L,
cdm <- mockCohortCharacteristics(my_cohort = my_cohort) |>
codelist_name = c(rep("codelist_1", 4), "codelist_2", "codelist_3", "codelist_4"),
codelist_type = c(rep("index event", 4), rep("inclusion criteria", 2), "exit criteria")
expect_error(res <- summariseCohortCodelist(cohort = cdm$my_cohort))
cdm <- omopgenerics::insertTable(cdm = cdm, name = "concept", table = dplyr::tibble(
concept_name = c("abc", "def", "fras", "Dewcds", "mcecods"),
codelist_type = c(rep("index event", 4), rep("inclusion criteria", 2), "exit criteria"),
concept_name = c("abc", "def", "Dewcds", "mcecods", "abc", "Dewcds", "mcecods"),
concept_id = c(1L, 2L, 4L, 5L, 1L, 4L, 5L)
expect_no_error(res <- summariseCohortCodelist(cohort = cdm$my_cohort))
expect_true(inherits(tableCohortCodelist(res, type = "tibble"), "tbl"))
expect_true(inherits(tableCohortCodelist(res, type = "gt"), "gt_tbl"))
expect_true(inherits(tableCohortCodelist(res, type = "flextable"), "flextable"))
expect_true(inherits(tableCohortCodelist(res, type = "datatable"), "datatables"))
expect_true(inherits(tableCohortCodelist(res, type = "reactable"), "reactable"))