tests/testthat/test-eval-code.R

test_that("eval_code() works", {
  x <- eval_code(expression(1 + 1))
  
  expect_equal(x, 2)
  
  expect_message(eval_code(expression(stop())), "there was an error")
  expect_message(eval_code(expression(warning())), "there was a warning")
})

Try the shinyobjects package in your browser

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

shinyobjects documentation built on July 29, 2020, 9:07 a.m.