Skip to content
This repository has been archived by the owner on Oct 24, 2024. It is now read-only.

Commit

Permalink
Added snapshot for cat_plot_html
Browse files Browse the repository at this point in the history
  • Loading branch information
sda030 committed Aug 24, 2024
1 parent 83ac2ea commit 9b2ed3d
Show file tree
Hide file tree
Showing 3 changed files with 211 additions and 1 deletion.
3 changes: 2 additions & 1 deletion DESCRIPTION
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,8 @@ Suggests:
tibble,
withr,
quarto,
spelling
spelling,
vdiffr
Config/testthat/edition: 3
Encoding: UTF-8
RoxygenNote: 7.3.2
Expand Down
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
8 changes: 8 additions & 0 deletions tests/testthat/test-make_content.cat_plot_html.R
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
testthat::test_that("show.legend works with unused categories", {
vdiffr::expect_doppelganger(title = "Unused categories in legend",
fig = {
saros.contents::ex_survey |>
dplyr::filter(dplyr::if_all(p_1:p_4, ~.x != "Strongly agree")) |>
saros.contents::makeme(dep=p_1:p_4, indep=x1_sex)
})
})

0 comments on commit 9b2ed3d

Please sign in to comment.