Skip to content

Commit

Permalink
fix: tests for colin for afex_aov
Browse files Browse the repository at this point in the history
  • Loading branch information
mattansb committed Sep 2, 2021
1 parent a10448c commit 1f275c3
Showing 1 changed file with 8 additions and 4 deletions.
12 changes: 8 additions & 4 deletions tests/testthat/test-check_collinearity.R
Original file line number Diff line number Diff line change
Expand Up @@ -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)),
Expand All @@ -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)
Expand Down

0 comments on commit 1f275c3

Please sign in to comment.