Skip to content

Commit

Permalink
add test
Browse files Browse the repository at this point in the history
  • Loading branch information
strengejacke committed Dec 30, 2024
1 parent b8406df commit f759762
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions tests/testthat/test-demean.R
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,12 @@ test_that("demean works", {
)
)
expect_snapshot(head(x))

df$Sepal.Length_within <- df$Sepal.Length
expect_error(
demean(df, select = c("Sepal.Length", "Petal.Length"), by = "ID"),
regex = "One or more of"
)
})

test_that("demean interaction term", {
Expand Down

0 comments on commit f759762

Please sign in to comment.