tests/testthat/test-herpSynonyms.R

test_that("herpSynonyms returns expected output", {
  skip_on_cran()
  skip_if_not(Sys.getenv("NOT_CRAN") == "true")
  
  boa <- letsHerp::allReptiles[grep("^Boa\\s", letsHerp::allReptiles$species),]
  result <- herpSynonyms(boa, getRef = FALSE, cores=2)
  
  expect_s3_class(result, "data.frame")
  expect_true("synonyms" %in% names(result))
  expect_gt(nrow(result), 0)
})

Try the letsHerp package in your browser

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

letsHerp documentation built on June 23, 2025, 5:09 p.m.