testthat:3.2.2 Reason: empty test

Hi when running,

test_that("ReinsCaptialBackupSlide", {
  expect_no_error(1)
})

I get the following response:

── Skip: ReinsCaptialBackupSlide ───────────────────────────────────────────────────────────────────────────────────────────────────────────────────
Reason: empty test

I want testthat to register that there's a test. Can someone please point me to why this occurs and how to fix it? We have much more expansive tests, but I think this is our root issue. I would like testthat to register that there's a test for reporting reasons. We have automated tests running in Azure pipelines.

Thank you for any help.

This seems like a bug in testthat.

Here is a workaround:

test_that("...", {
  expect_true(TRUE)
})
1 Like

For future reference bug fix is in testthat 3.2.3

See Release testthat 3.2.3 · r-lib/testthat · GitHub