Skip to content

Commit

Permalink
add test for silencer
Browse files Browse the repository at this point in the history
  • Loading branch information
malcolmbarrett committed May 17, 2024
1 parent d0cfa3f commit da938e3
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions tests/testthat/test-weights.R
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,15 @@ test_that("ATE works for binary cases", {
weights <- wt_ate(c(.1, .3, .4, .3), .exposure = c(0, 0, 1, 0)),
"Treating `.exposure` as binary"
)

expect_silent(
wt_ate(
c(.1, .3, .4, .3),
.exposure = c(0, 0, 1, 0),
exposure_type = "binary"
)
)

expect_equal(
weights,
c(1.11, 1.43, 2.50, 1.43),
Expand Down

0 comments on commit da938e3

Please sign in to comment.