tests/testthat/helper-auths.R

# Helper function for testing

testing_with_authentication <- function(auth) {
  skip_if_offline()
  if (!auth %in% auth_list()) {
    skip("Requires a different authentication")
  }
  withr::defer_parent(auth_as(auth_get()))
  auth_as(auth)
}

Try the rtweet package in your browser

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

rtweet documentation built on Oct. 17, 2023, 1:11 a.m.