tests/testthat/test-cdb_metadata.R

test_that("cdb_metadata works correctly", {
  Compadre_metadata <- cdb_metadata(Compadre)

  expect_s3_class(Compadre_metadata, "tbl_df")
  expect_identical(ncol(Compadre_metadata), as.integer(ncol(Compadre) - 1))
})


test_that("cdb_metadata warns and fails gracefully", {
  Compadre_metadata <- cdb_metadata(Compadre)

  expect_error(cdb_metadata(Compadre_metadata))
})

Try the Rcompadre package in your browser

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

Rcompadre documentation built on Oct. 17, 2024, 1:07 a.m.