tests/testthat/test_l_del.R

config.json <- system.file("extdata", "config.json", package = "configr")
config <- read.config(config.json, file.type = "json")

test_that("config.section.del", {
  x1 <- "default" %in% names(config)
  config <- config.sections.del(config, "default")
  x2 <- !"default" %in% names(config)
  expect_that(x1 && x2, equals(TRUE))
})

Try the configr package in your browser

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

configr documentation built on July 17, 2020, 5:07 p.m.