Skip to content

Commit

Permalink
add test
Browse files Browse the repository at this point in the history
  • Loading branch information
strengejacke committed Jul 24, 2024
1 parent 6ba664f commit 70f7e04
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions tests/testthat/test-get_variance.R
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,14 @@ v4 <- suppressWarnings(get_variance(fm4))
v5 <- suppressWarnings(get_variance(fm5))
v6 <- suppressWarnings(get_variance(fm6))

test_that("error for non-mixed", {
data(mtcars)
expect_error(
get_vaiance(lm(mpg ~ gear, data = mtcars)),
regex = "This function only works for mixed models"
)
})

test_that("get_variance-1", {
expect_equal(v1$var.intercept,
c(Subject = 612.10016),
Expand Down

0 comments on commit 70f7e04

Please sign in to comment.