2022-09-30 12:57:23 +02:00
|
|
|
test_that("generic_stroke() runs!", {
|
2023-01-12 13:44:29 +01:00
|
|
|
iris$ord <-
|
|
|
|
factor(sample(1:3, size = nrow(iris), replace = TRUE), ordered = TRUE)
|
|
|
|
result <-
|
|
|
|
generic_stroke(
|
|
|
|
df = iris,
|
|
|
|
group = "Species",
|
|
|
|
score = "ord",
|
|
|
|
variables = colnames(iris)[1:3]
|
|
|
|
)
|
2022-09-30 12:57:23 +02:00
|
|
|
expect_equal(length(result), 3)
|
2023-01-03 14:12:29 +01:00
|
|
|
expect_equal(class(result), "list")
|
2023-01-12 13:44:29 +01:00
|
|
|
expect_true("tbl_summary" %in% class(result[[1]]))
|
|
|
|
expect_true("gg" %in% class(result[[2]]))
|
|
|
|
expect_true("gg" %in% class(result[[3]]))
|
2023-01-03 14:12:29 +01:00
|
|
|
})
|