diff --git a/tests/testthat/test-check_collinearity.R b/tests/testthat/test-check_collinearity.R index a3ce2b54c..ea3dd56cd 100644 --- a/tests/testthat/test-check_collinearity.R +++ b/tests/testthat/test-check_collinearity.R @@ -216,7 +216,7 @@ test_that("check_collinearity, hurdle/zi models w/o zi-formula", { test_that("check_collinearity, invalid data", { dd <- data.frame(y = as.difftime(0:5, units = "days")) m1 <- lm(y ~ 1, data = dd) - expect_error(check_collinearity(m1), "Can't extract variance-covariance matrix") + expect_message(check_collinearity(m1), "Could not extract the variance-covariance") }) test_that("check_collinearity, glmmTMB hurdle w/o zi", { diff --git a/tests/testthat/test-check_model.R b/tests/testthat/test-check_model.R index 2b1141d26..216062a08 100644 --- a/tests/testthat/test-check_model.R +++ b/tests/testthat/test-check_model.R @@ -40,7 +40,7 @@ test_that("`check_outliers()` works if convergence issues", { 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(check_model(m1)) + expect_message(check_model(m1), regex = "Date variables are not") }) test_that("`check_model()` works for quantreg", {