@@ -46,6 +46,7 @@ test_that("openFDA can call its API and reach correct endpoints", {
4646
4747test_that(
4848 desc = " openFDA paging is possible with correct printing behaviour" , {
49+ skip_if_not_installed(pkg = " vcr" )
4950 vcr :: use_cassette(" test-paging" , {
5051 # Query which requires paging
5152 resps <- openFDA(search = " openfda.generic_name:\" semaglutide\" " ,
@@ -76,6 +77,7 @@ test_that(
7677# Does not need vcr as error is thrown *before* any HTTP requests sent
7778test_that(
7879 desc = " openFDA paging fails if `paging == \" ask\" but not interactive" , {
80+ skip_if_not_installed(pkg = " vcr" )
7981 skip_if(interactive())
8082 # Query which requires paging
8183 expect_error(
@@ -88,6 +90,7 @@ test_that(
8890})
8991
9092test_that(" openFDA throws formatted HTTP errors" , {
93+ skip_if_not_installed(pkg = " vcr" )
9194 vcr :: use_cassette(" test-handle_http_errors" , {
9295 for (handle_http_errors in c(" error" , " warn" , " silent" )) {
9396 expect_fn <- switch (handle_http_errors ,
@@ -193,7 +196,8 @@ test_that("openFDA throws formatted HTTP errors", {
193196 })
194197})
195198
196- # Also doesn't require vcr --> errors occur before `httr2::req_perform()`
199+ # Doesn't require vcr and no need to skip on CRAN --> errors occur before
200+ # `httr2::req_perform()`
197201test_that(" openFDA errors on certain bad inputs" , {
198202 suppressMessages(
199203 set_api_key(api_key = " api_key_string" )
0 commit comments