tests/testthat/test-check4leaflet.R

context("check4leaflet")

skip_if_not_installed <- function(pkg) {
  if (requireNamespace(pkg, quietly = TRUE))
    return()
  testthat::skip(paste0(pkg, " not installed"))
}

test_that("check4leaflet returns TRUE", {
  skip_if_not_installed("leaflet")

  expect_true(check4leaflet())
})

Try the lawn package in your browser

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

lawn documentation built on Jan. 6, 2021, 5:07 p.m.