Skip to content

Commit

Permalink
remove test from ard_categorical
Browse files Browse the repository at this point in the history
  • Loading branch information
jtalboys committed Sep 26, 2024
1 parent 70d8f20 commit 40115cc
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 24 deletions.
17 changes: 0 additions & 17 deletions tests/testthat/_snaps/ard_categorical.md
Original file line number Diff line number Diff line change
Expand Up @@ -188,23 +188,6 @@

# ard_categorical() errors with incomplete factor columns

Code
ard_categorical(dplyr::mutate(mtcars, am = factor(am)), variables = am)
Message
{cards} data frame: 6 x 9
Output
variable variable_level context stat_name stat_label stat
1 am 0 categori… n n 19
2 am 0 categori… N N 32
3 am 0 categori… p % 0.594
4 am 1 categori… n n 13
5 am 1 categori… N N 32
6 am 1 categori… p % 0.406
Message
i 3 more variables: fmt_fn, warning, error

---

Code
ard_categorical(dplyr::mutate(mtcars, am = factor(am, levels = character(0))),
variables = am)
Expand Down
7 changes: 0 additions & 7 deletions tests/testthat/test-ard_categorical.R
Original file line number Diff line number Diff line change
Expand Up @@ -870,13 +870,6 @@ test_that("ard_categorical() with hms times", {
})

test_that("ard_categorical() errors with incomplete factor columns", {
# First check output is fine when there is a valid factor variable
expect_snapshot(
mtcars |>
dplyr::mutate(am = factor(am)) |>
ard_categorical(variables = am)
)

# Check error when factors have no levels
expect_snapshot(
error = TRUE,
Expand Down

0 comments on commit 40115cc

Please sign in to comment.