tests/testthat/test-function-clear_storage.R

test_that("clear_storage() works", {

  f <- kwb.fakin:::clear_storage

  expect_error(f())
  expect_output(f("abc"), "No objects")

  xyz <- 1
  capture.output(kwb.fakin:::store(xyz, script = "testscript"))
  expect_output(f("xyz"), "Deleting")
})
KWB-R/kwb.fakin documentation built on June 14, 2022, 2 p.m.