tests/testthat/test_000_setup.R

context("setup")

# initialize data
test_that("phantomjs", {
  skip_on_cran()
  # check if phantomjs installed and install if needed
  if (!isTRUE(wdpar:::has_phantomjs())) {
    webdriver::install_phantomjs()
  }
  # update variable
  is_phantomjs_available <<- wdpar:::has_phantomjs()
  # tests
  expect_is(is_phantomjs_available, "logical")
})

Try the wdpar package in your browser

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

wdpar documentation built on Sept. 21, 2023, 5:06 p.m.