tests/testthat/test-plt-diag.R

test_that("bcat_plt_diag returns patchwork object", {
  m <- lm(mpg ~ wt + hp, data = mtcars)
  p <- bcat_plt_diag(m, tests = FALSE)
  expect_true(inherits(p, "patchwork"))
})

test_that("bcat_plt_diag works with which parameter", {
  m <- lm(mpg ~ wt + hp, data = mtcars)
  p <- bcat_plt_diag(m, which = c(1, 2), tests = FALSE)
  expect_true(inherits(p, "patchwork") || inherits(p, "ggplot"))
})

Try the Rbearcat package in your browser

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

Rbearcat documentation built on March 21, 2026, 5:07 p.m.