tests/testthat/test-validate_arguments.R

test_that("validate_arguments throws errors as expected", {
  expect_error(validate_arguments(arg_max_attempts = "1L"))

  expect_error(validate_arguments(arg_max_attempts = -1L))
})


test_that("validate_arguments returns nothing as expected", {
  expect_null(
    validate_arguments(
      arg_max_attempts = 3L
    )
  )
})

Try the geckor package in your browser

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

geckor documentation built on Nov. 1, 2021, 5:07 p.m.