tests/testthat/test-docs-exports.R

test_that("each export has documentation (alias present)", {
  skip()
  skip_if_not(requireNamespace("robustfa", quietly = TRUE))
  ex <- getNamespaceExports("robustfa")
  db <- tryCatch(
    tools::Rd_db("robustfa"),
    error = function(e) testthat::skip(paste("docs unavailable/corrupt:", conditionMessage(e)))
  )
  aliases <- unique(unlist(lapply(db, function(rd) tools:::.Rd_get_metadata(rd, "alias"))))
  missing <- setdiff(ex, aliases)
  if (length(missing)) message("Undocumented exports: ", paste(missing, collapse = ", "))
  expect_lt(length(missing), max(1, floor(length(ex) * 0.25)))
})

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.