Skip to content

Commit

Permalink
add test
Browse files Browse the repository at this point in the history
  • Loading branch information
strengejacke committed Oct 4, 2023
1 parent 2c3c00a commit 7caea04
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions tests/testthat/test-check_heterogeneity_bias.R
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
test_that("check_heterogeneity_bias", {
data(iris)
set.seed(123)
iris$ID <- sample(1:4, nrow(iris), replace = TRUE) # fake-ID
out <- check_heterogeneity_bias(iris, select = c("Sepal.Length", "Petal.Length"), group = "ID")
expect_equal(out, c("Sepal.Length", "Petal.Length"), ignore_attr = TRUE)
expect_output(print(out), "Possible heterogeneity bias due to following predictors: Sepal\\.Length, Petal\\.Length")
})

0 comments on commit 7caea04

Please sign in to comment.