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")) })