tests/testthat/test-namespace.R

test_that("every exported function is actually defined in the namespace", {
  ns <- asNamespace("CGNM")
  exported <- getNamespaceExports(ns)

  missing <- exported[!vapply(exported, exists, logical(1), envir = ns, inherits = FALSE)]

  expect_length(missing, 0)
})

Try the CGNM package in your browser

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

CGNM documentation built on Sept. 13, 2026, 9:06 a.m.