From 1f275c3f04f0a2c2adfea28f5579ad2628b92dc8 Mon Sep 17 00:00:00 2001 From: mattansb <35330040+mattansb@users.noreply.github.com> Date: Thu, 2 Sep 2021 10:26:58 +0300 Subject: [PATCH] fix: tests for colin for afex_aov #354 --- tests/testthat/test-check_collinearity.R | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/tests/testthat/test-check_collinearity.R b/tests/testthat/test-check_collinearity.R index 71ad9050f..ecfdef766 100644 --- a/tests/testthat/test-check_collinearity.R +++ b/tests/testthat/test-check_collinearity.R @@ -64,9 +64,13 @@ if (require("testthat") && require("performance") && require("glmmTMB")) { ) })) - expect_error(check_collinearity(aM)) - expect_error(check_collinearity(aW)) - expect_error(check_collinearity(aB)) + expect_message(ccoM <- check_collinearity(aM)) + expect_message(ccoW <- check_collinearity(aW)) + expect_message(ccoB <- check_collinearity(aB), regexp = NA) + + expect_equal(nrow(ccoM), 15) + expect_equal(nrow(ccoW), 3) + expect_equal(nrow(ccoB), 3) suppressWarnings(suppressMessages({ aM <- afex::aov_car(value ~ treatment * gender + Error(id / (phase * hour)), @@ -87,7 +91,7 @@ if (require("testthat") && require("performance") && require("glmmTMB")) { expect_message(ccoM <- check_collinearity(aM)) expect_message(ccoW <- check_collinearity(aW)) - expect_message(ccoB <- check_collinearity(aB)) + expect_message(ccoB <- check_collinearity(aB), regexp = NA) expect_equal(nrow(ccoM), 15) expect_equal(nrow(ccoW), 3)