Skip to content

Commit f25ad70

Browse files
committed
fix test
1 parent 20910f5 commit f25ad70

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

tests/testthat/test-mcmc-traces.R

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,11 @@ test_that("mcmc_trace options work", {
5151
expect_equal(g1$coordinates$limits$x, c(5, 10))
5252

5353
expect_gg(g2 <- mcmc_trace(arr, regex_pars = "beta", n_warmup = 10))
54-
ll <- g2$labels
54+
if ("get_labs" %in% getNamespaceExports("ggplot2")) {
55+
ll <- ggplot2::get_labs(g2)
56+
} else {
57+
ll <- g2$labels
58+
}
5559
expect_true(all(c("xmin", "xmax", "ymin", "ymax") %in% names(ll)))
5660

5761
expect_error(mcmc_trace(arr, iter1 = -1))

0 commit comments

Comments
 (0)