tests/testthat/test-function.R

context("function")

test_that("function", {
  expect_identical(check_function(character), character)
  expect_error(check_function(character()), "character[(][)] must be a function")
  expect_error(check_function(character, nargs = 0L), "character must have 0 arguments")
})

Try the checkr package in your browser

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

checkr documentation built on May 1, 2019, 6:59 p.m.