Skip to content

Commit

Permalink
add check
Browse files Browse the repository at this point in the history
  • Loading branch information
strengejacke committed Mar 26, 2024
1 parent 22cb8c7 commit 42e0e70
Show file tree
Hide file tree
Showing 2 changed files with 118 additions and 0 deletions.
103 changes: 103 additions & 0 deletions tests/testthat/_snaps/check_model/check-model-works-for-lm.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
15 changes: 15 additions & 0 deletions tests/testthat/test-check_model.R
Original file line number Diff line number Diff line change
Expand Up @@ -111,3 +111,18 @@ test_that("`check_model()` works if convergence issues", {
x <- performance::check_model(m)
expect_s3_class(x, "check_model")
})



test_that("`check_model()` works if convergence issues", {
skip_on_cran()
skip_if_not_installed("performance")
data(mtcars)
m <- lm(mpg ~ wt + cyl + gear + disp, data = mtcars)
set.seed(123)
x <- performance::check_model(m)
vdiffr::expect_doppelganger(
title = "check_model works for lm",
fig = plot(x)
)
})

0 comments on commit 42e0e70

Please sign in to comment.