mirror of
https://github.com/msberends/AMR.git
synced 2025-07-18 11:33:18 +02:00
more unit tests
This commit is contained in:
@ -66,5 +66,20 @@ test_that("frequency table works", {
|
||||
pull(age) %>%
|
||||
sort())
|
||||
|
||||
# check format
|
||||
expect_identical(septic_patients %>%
|
||||
freq(age) %>%
|
||||
format() %>%
|
||||
apply(2, class) %>%
|
||||
unname(),
|
||||
rep("character", 5))
|
||||
|
||||
# check tibble
|
||||
expect_identical(septic_patients %>%
|
||||
freq(age) %>%
|
||||
as_tibble() %>%
|
||||
class() %>%
|
||||
.[1],
|
||||
"tbl_df")
|
||||
})
|
||||
|
||||
|
Reference in New Issue
Block a user