tests/testthat/test-herpSearch.R

test_that("herpSearch returns expected output", {
  skip_on_cran()
  skip_if_not(Sys.getenv("NOT_CRAN") == "true")
  
  result <- herpSearch("Philodryas livida")
  
  expect_type(result, "list")
  expect_true("species" %in% names(result))
  expect_gt(length(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.