tests/testthat/test_datasets.R

library("testthat")
library("neotoma2")

test_that("`datasets()`", {
  skip_on_cran()
  dls <- get_sites() %>%
    get_downloads()
  sumDl <- summary(dls)
  ids <- getids(dls)
  dss <- datasets(dls)
  testthat::expect_identical(length(dss), nrow(ids))
  testthat::expect_identical(sum(sumDl$n_datasets), nrow(ids))
  testthat::expect_identical(length(unique(dss$datasetid)),
                             length(unique(ids$datasetid)))
})

Try the neotoma2 package in your browser

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

neotoma2 documentation built on Dec. 6, 2025, 5:07 p.m.