Nothing
# Run all tests in this script:
## testthat::test_file(file.path("tests", "testthat", "test-site_subset.R"))
# Simple error testing
test_that("Only accepts correct inputs", {
expect_error(site_subset(sites = "xxxxx")) # too many chars
expect_error(site_subset(sites = "AND", habitat = "marine")) # no sites returned
})
# Warning testing
test_that("Warnings are returned", {
expect_warning(site_subset(sites = c("AND", "YYY"))) # unrecognized site code
expect_warning(site_subset(habitat = c("forest", "space"))) # habitat not in data
})
# Output testing
test_that("Outputs are correct", {
site_df <- site_subset(sites = "JRN")
expect_equal(class(site_df), "data.frame")
})
Any scripts or data that you put into this service are public.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.