tests/testthat/test-mocks.R

test_that("cli_abort() | General test", {
  cli_abort("A") |> testthat::expect_error()
})

test_that("is_interactive() | General test", {
  is_interactive() |> testthat::expect_equal(interactive())
})

test_that("test_file_exists() | General test", {
  test_file_exists("TeST") |> testthat::expect_false()
})

Try the brandr package in your browser

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

brandr documentation built on April 4, 2025, 5:30 a.m.