tests/testthat/test-core-version.R

# SETUP ----
utils_version <- wood_core_version("utils")

# TESTS ----
test_version(utils_version)
test_param_package(wood_core_version)

test_that("raises an exception if package not available", {
  expect_error(
    wood_core_version("fakepackage"),
    "`package` must be one of R core packages.",
    fixed = TRUE
  )
})

Try the woodendesc package in your browser

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

woodendesc documentation built on April 18, 2023, 5:09 p.m.