tests/testthat/test-mockVocabRef.R

test_that("mock vocab db", {
  cdmDb <- mockVocabRef("database")
  cdmDF <- mockVocabRef("data_frame")

  conceptFromDb <- cdmDb$concept %>% dplyr::collect()
  conceptFromDf <- cdmDF$concept %>% dplyr::collect()

  expect_equal(conceptFromDb,
                    conceptFromDf,
                    ignore_attr = TRUE)

  CDMConnector::cdm_disconnect(cdm = cdmDb)
  })

Try the CodelistGenerator package in your browser

Any scripts or data that you put into this service are public.

CodelistGenerator documentation built on Oct. 17, 2024, 5:09 p.m.