tests/testthat/test-tbl_null_report.R

test_that("tbl_null_report() works correctly", {
  expect_equal(
    tbl_null_report()$table_body |> nrow(),
    0
  )

  expect_identical(
    tbl_null_report()$table_styling$header$label,
    "No observations met the reporting criteria for this output."
  )

  expect_error(
    tbl_null_report(label = 1)
  )
})

Try the crane package in your browser

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

crane documentation built on Dec. 6, 2025, 5:08 p.m.