Skip to content

Commit

Permalink
snap updates
Browse files Browse the repository at this point in the history
  • Loading branch information
ddsjoberg committed Jan 23, 2024
1 parent cb94568 commit 6e57aa3
Show file tree
Hide file tree
Showing 2 changed files with 21 additions and 17 deletions.
6 changes: 2 additions & 4 deletions tests/testthat/_snaps/ard_proportion_ci.md
Original file line number Diff line number Diff line change
@@ -1,8 +1,7 @@
# ard_proportion_ci(method='strat_wilson') works

Code
ard_proportion_ci(data = data.frame(rsp = rsp, strata = interaction(strata_data)),
variables = rsp, strata = strata, weights = weights, method = "strat_wilson")
ard_proportion_ci_strat_wilson
Message
{cards} data frame: 1 x 8
Output
Expand All @@ -14,8 +13,7 @@
---

Code
ard_proportion_ci(data = data.frame(rsp = rsp, strata = interaction(strata_data)),
variables = rsp, strata = strata, weights = weights, method = "strat_wilsoncc")
ard_proportion_ci_strat_wilsoncc
Message
{cards} data frame: 1 x 8
Output
Expand Down
32 changes: 19 additions & 13 deletions tests/testthat/test-ard_proportion_ci.R
Original file line number Diff line number Diff line change
Expand Up @@ -33,8 +33,9 @@ test_that("ard_proportion_ci(method='strat_wilson') works", {

weights <- 1:6 / sum(1:6)

expect_snapshot(
ard_proportion_ci(
expect_error(
ard_proportion_ci_strat_wilson <-
ard_proportion_ci(
data = data.frame(
rsp = rsp,
strata = interaction(strata_data)
Expand All @@ -43,19 +44,24 @@ test_that("ard_proportion_ci(method='strat_wilson') works", {
strata = strata,
weights = weights,
method = "strat_wilson"
)
),
NA
)
expect_snapshot(ard_proportion_ci_strat_wilson)

expect_snapshot(
ard_proportion_ci(
data = data.frame(
rsp = rsp,
strata = interaction(strata_data)
expect_error(
ard_proportion_ci_strat_wilsoncc <-

Check warning on line 53 in tests/testthat/test-ard_proportion_ci.R

View workflow job for this annotation

GitHub Actions / SuperLinter 🦸‍♀️ / Lint R code 🧶

file=tests/testthat/test-ard_proportion_ci.R,line=53,col=5,[object_length_linter] Variable and function names should not be longer than 30 characters.
ard_proportion_ci(
data = data.frame(
rsp = rsp,
strata = interaction(strata_data)
),
variables = rsp,
strata = strata,
weights = weights,
method = "strat_wilsoncc"
),
variables = rsp,
strata = strata,
weights = weights,
method = "strat_wilsoncc"
)
NA
)
expect_snapshot(ard_proportion_ci_strat_wilsoncc)
})

0 comments on commit 6e57aa3

Please sign in to comment.