tests/testthat/test-verbose.R

test_that("set_verbose works", {
  # Input checks
  expect_error(set_verbose("not_a_boolean"))

  # Test set and unset API key
  set_verbose(TRUE)
  expect_equal(Sys.getenv("HERE_VERBOSE"), "TRUE")
  set_verbose(FALSE)
  expect_equal(Sys.getenv("HERE_VERBOSE"), "")
})

Try the hereR package in your browser

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

hereR documentation built on Sept. 18, 2023, 5:21 p.m.