tests/testthat/test-call_user_fun.R

test_that("Test 1: Error is issued to function call if function errors", {
  expect_error(
    call_user_fun(compute_bmi(height = 172, weight = "hallo"))
  )
})

Try the admiral package in your browser

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

admiral documentation built on Oct. 19, 2023, 1:08 a.m.