Skip to content

Commit

Permalink
add test
Browse files Browse the repository at this point in the history
  • Loading branch information
strengejacke committed Mar 4, 2024
1 parent 71c7b45 commit e91f77d
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions tests/testthat/test-data_summary.R
Original file line number Diff line number Diff line change
Expand Up @@ -141,6 +141,11 @@ test_that("data_summary, errors", {
data_summary(mtcars, mw = mesn(mpg), by = "am"),
regex = "There was an error"
)
# wrong variable name
expect_error(
data_summary(mtcars, n = max(mpeg)),
regex = "There was an error"
)
# expression returns more than one value
expect_error(
data_summary(mtcars, n = unique(mpg), j = c(min(am), max(am)), by = c("am", "gear")),
Expand Down

0 comments on commit e91f77d

Please sign in to comment.