tests/testthat/test-all.R

test_that("no data inherits spec_tbl_df", {
  library(r2dii.data)
  has_spec <- suppressWarnings(
    vapply(
      enlist_datasets("r2dii.data"),
      function(.x) inherits(.x, "spec_tbl_df"),
      logical(1)
    )
  )

  expect_false(any(has_spec))
})

test_that("no data is grouped", {
  library(r2dii.data)
  is_grouped <- vapply(
    enlist_datasets("r2dii.data"),
    function(.x) inherits(.x, "grouped_df"),
    logical(1)
  )

  expect_false(any(is_grouped))
})

Try the r2dii.data package in your browser

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

r2dii.data documentation built on Nov. 14, 2023, 1:09 a.m.