Skip to content

Commit

Permalink
update tests
Browse files Browse the repository at this point in the history
  • Loading branch information
strengejacke committed Jan 30, 2025
1 parent 729c5eb commit 070c69f
Show file tree
Hide file tree
Showing 8 changed files with 1,358 additions and 713 deletions.
358 changes: 179 additions & 179 deletions tests/testthat/_snaps/vdiffr_themes/theme-abyss-works.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
338 changes: 169 additions & 169 deletions tests/testthat/_snaps/vdiffr_themes/theme-blackboard-works.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
376 changes: 188 additions & 188 deletions tests/testthat/_snaps/vdiffr_themes/theme-lucid-works.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
354 changes: 177 additions & 177 deletions tests/testthat/_snaps/vdiffr_themes/theme-modern-works.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
24 changes: 24 additions & 0 deletions tests/testthat/test-vdiffr_themes.R
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,14 @@ test_that("theme functions work", {
theme_modern()
)

set.seed(123)
vdiffr::expect_doppelganger(
title = "theme_modern works with base_size",
fig = ggplot(iris, aes(x = Sepal.Width, y = Sepal.Length, color = Species)) +
geom_point() +
theme_modern(base_size = 20)
)

set.seed(123)
vdiffr::expect_doppelganger(
title = "theme_lucid works",
Expand All @@ -43,6 +51,14 @@ test_that("theme functions work", {
theme_lucid()
)

set.seed(123)
vdiffr::expect_doppelganger(
title = "theme_lucid works with base_size",
fig = ggplot(iris, aes(x = Sepal.Width, y = Sepal.Length)) +
geom_point(color = "white") +
theme_lucid(base_size = 20)
)

set.seed(123)
vdiffr::expect_doppelganger(
title = "theme_abyss works",
Expand All @@ -58,4 +74,12 @@ test_that("theme functions work", {
geom_point(color = "white") +
theme_blackboard()
)

set.seed(123)
vdiffr::expect_doppelganger(
title = "theme_blackboard works with base_size",
fig = ggplot(iris, aes(x = Sepal.Width, y = Sepal.Length)) +
geom_point(color = "white") +
theme_blackboard(base_size = 18)
)
})

0 comments on commit 070c69f

Please sign in to comment.