tests/testthat/test-zzz.R

context("zzz.R - .onLoad")

test_that("onLoad makes generics if texreg is present", {

  e <- environment(.onLoad)

  environment(.onLoad) <- new.env(parent = parent.env(e))
  environment(.onLoad)$extract.lm_robust <- e$extract.lm_robust

  expect_null(.onLoad("estimatr", "estimatr"))
  environment(.onLoad) <- e
})
DeclareDesign/estimatr documentation built on Jan. 30, 2024, 9:05 p.m.