Built-in skip() functions
There is a family of skip() functions that anticipate some common situations.
test_that("foo api returns bar when given baz", {
skip_if(api_unavailable(), "API not available")
...
})
test_that("foo api returns bar when given baz", {
skip_if_not(api_available(), "API not available")
...
})
skip_if_not_installed("sp")
skip_if_not_installed("stringi", "1.2.2")
skip_if_offline()
skip_on_cran()
skip_on_os("windows")