tests/testthat/test-exports.R

test_that("exported objects exist (aware of exportMethods)", {
  skip()
  skip_if_not(requireNamespace("robustfa", quietly = TRUE))
  details <- dangling_exports_details("robustfa")
  if (nrow(details)) {
    msg <- paste0(
      "Dangling exports in NAMESPACE:\n",
      paste0(
        sprintf("  - %s (NAMESPACE:%s)%s",
                details$name,
                ifelse(is.na(details$namespace_line), "?", details$namespace_line),
                ifelse(is.na(details$namespace_text) | details$namespace_text == "", "", paste0("\n      ", details$namespace_text))
        ),
        collapse = "\n"
      )
    )
    fail(msg)
  } else {
    succeed()
  }
})

Try the robustfa package in your browser

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

robustfa documentation built on Sept. 13, 2025, 1:09 a.m.