tests/testthat/test-safe.R

context("test-safe")

test_that("warn if unused dots", {
  expect_error(safe_median(1:10), NA)
  expect_error(safe_median(1:10, na.rm = TRUE), NA)
  expect_error(safe_median(1:10, y = 1), class = "rlib_error_dots_unused")
})

Try the ellipsis package in your browser

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

ellipsis documentation built on April 29, 2021, 5:06 p.m.