Skip to content

Commit

Permalink
add test
Browse files Browse the repository at this point in the history
  • Loading branch information
strengejacke committed Feb 10, 2025
1 parent 732900e commit 3255a33
Show file tree
Hide file tree
Showing 2 changed files with 92 additions and 1 deletion.
85 changes: 85 additions & 0 deletions tests/testthat/_snaps/plot-ordinal/plot-ordinal-2.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
8 changes: 7 additions & 1 deletion tests/testthat/test-plot-ordinal.R
Original file line number Diff line number Diff line change
Expand Up @@ -9,10 +9,16 @@ skip_on_cran()
test_that("plots ordinal", {
m <- MASS::polr(Species ~ Sepal.Width, data = iris)
out <- estimate_means(m, by = "Sepal.Width")

set.seed(123)
vdiffr::expect_doppelganger(
"plot-ordinal-1",
plot(out, show_data = FALSE)
)

out <- estimate_relation(m, by = "Sepal.Width")
set.seed(123)
vdiffr::expect_doppelganger(
"plot-ordinal-2",
plot(out, show_data = FALSE)
)
})

0 comments on commit 3255a33

Please sign in to comment.