tests/testthat/test-read_config.R

test_that("check reading config works", {
  # Check is the config file is available in the expected directory
  testthat::skip_if_not(
    condition = file.exists("./test-conf.envstat"),
    message = "Config file not found"
  )

  # read the config file
  config <- envstat:::read_config("test-conf.envstat")

  # Run the tests
  testthat::expect_type(config, "list")
})

Try the envstat package in your browser

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

envstat documentation built on June 14, 2022, 5:06 p.m.