Skip to content

Commit

Permalink
add test
Browse files Browse the repository at this point in the history
  • Loading branch information
strengejacke committed Feb 4, 2024
1 parent 8d9299e commit a2b5e71
Showing 1 changed file with 12 additions and 0 deletions.
12 changes: 12 additions & 0 deletions tests/testthat/test-check_model.R
Original file line number Diff line number Diff line change
Expand Up @@ -36,3 +36,15 @@ test_that("`check_outliers()` works if convergence issues", {
x <- check_outliers(m, verbose = FALSE)
expect_s3_class(x, "check_outliers")
})

test_that("`check_model()` for invalid models", {
dd <- data.frame(y = as.difftime(0:5, units = "days"))
m1 <- lm(y ~ 1, data = dd)
expect_error(
expect_message(
check_model(m1),
regex = "Date variables are not supported"
),
regex = "No numeric variables found"
)
})

0 comments on commit a2b5e71

Please sign in to comment.