tests/testthat/test-errors.R

# library(testthat); devtools::load_all()

context("errors")

test_that("grow() warns and stops correctly", {
  expect_warning(grow("randomtext_aslkdasdkfjhkj", from = "base"))
  expect_warning(grow("mtcars", from = "datasets"))
  expect_error(grow(some_function, from = list()))
})

Try the grapes package in your browser

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

grapes documentation built on May 2, 2019, 6:52 a.m.