diff --git a/NEWS.md b/NEWS.md index 6af72ee2..cf6771aa 100644 --- a/NEWS.md +++ b/NEWS.md @@ -1,5 +1,6 @@ # bayesplot (development version) +* Added test verifying `legend_move("none")` behaves equivalently to `legend_none()`. * Added singleton-dimension edge-case tests for exported `_data()` functions. * Validate empty list and zero-row matrix inputs in `nuts_params.list()`. * Validate user-provided `pit` values in `ppc_loo_pit_data()` and `ppc_loo_pit_qq()`, rejecting non-numeric inputs, missing values, and values outside `[0, 1]`. diff --git a/tests/testthat/test-convenience-functions.R b/tests/testthat/test-convenience-functions.R index a6f76499..b1ba7c02 100644 --- a/tests/testthat/test-convenience-functions.R +++ b/tests/testthat/test-convenience-functions.R @@ -120,6 +120,13 @@ test_that("legend_text returns correct theme object", { theme(legend.text = element_text(color = "purple", size = 16)) ) }) +test_that("legend_move('none') behaves like legend_none", { + expect_equal( + legend_move("none")$legend.position, + legend_none()$legend.position, + ignore_attr = TRUE + ) +}) # axis and facet text -------------------------------------------------- test_that("xaxis_text returns correct theme object", { @@ -186,8 +193,6 @@ test_that("overlay_function returns the correct object", { a$constructor <- b$constructor <- NULL expect_equal(a, b, ignore_function_env = TRUE) }) - - # tagged functions ------------------------------------------------------- test_that("as_tagged_function handles bare function (symbol)", {