tests/testthat/test-droplet.R

# tests for droplet
context("droplet")

test_that("fails well with no input", {
  expect_error(droplet(), "argument \"id\" is missing")
})

test_that("fails well with non-existent droplet", {
	skip_on_cran()

  expect_error(droplet("Baby Shark doo doo, doo doo doo doo"), "URL using bad/illegal format or missing URL")
})

test_that("httr curl options work", {
	skip_on_cran()

  library("httr")
  expect_error(droplet("Baby Shark doo doo, doo doo doo doo", config = timeout(seconds = 0.001)))
})

Try the analogsea package in your browser

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

analogsea documentation built on April 20, 2023, 1:34 a.m.