tests/testthat/test-onLoadAndAttach.R

testthat::test_that(".onLoad() is called without errors", {
  # Load your package
  library(causact)

  # Test if .onLoad() runs without errors
  testthat::expect_no_error(.onLoad(ns, exports))
})

testthat::test_that(".onAttach() is called without errors", {
  # Load your package
  library(causact)

  # Test if .onAttach() runs without errors
  testthat::expect_no_error(.onAttach(NULL))
})

Try the causact package in your browser

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

causact documentation built on Sept. 8, 2023, 5:46 p.m.