From da938e3528ecf396f7eac3e01727649313b39c3e Mon Sep 17 00:00:00 2001 From: Malcolm Barrett Date: Fri, 17 May 2024 12:17:25 -0400 Subject: [PATCH] add test for silencer --- tests/testthat/test-weights.R | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/tests/testthat/test-weights.R b/tests/testthat/test-weights.R index 034d35e..0c59451 100644 --- a/tests/testthat/test-weights.R +++ b/tests/testthat/test-weights.R @@ -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),