We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 9ea60d0 commit 3ce74b3Copy full SHA for 3ce74b3
1 file changed
tests/testthat/test_plot_density.R
@@ -11,7 +11,11 @@ test_that("Test plot_density", {
11
plt <- plot_density(fobject)
12
13
expect_s3_class(plt, "ggplot")
14
- expect_equal(plt$labels$x, "probability")
+ if ("get_labs" %in% getNamespaceExports("ggplot2")) {
15
+ expect_equal(ggplot2::get_labs(plt)$x, "probability")
16
+ } else {
17
+ expect_equal(plt$labels$x, "probability")
18
+ }
19
# no bias
20
set.seed(123)
21
data <- data.frame(
@@ -41,5 +45,9 @@ test_that("Test plot_density", {
41
45
42
46
43
47
44
- expect_equal(plt$labels$x, "predicted values")
48
49
+ expect_equal(ggplot2::get_labs(plt)$x, "predicted values")
50
51
+ expect_equal(plt$labels$x, "predicted values")
52
53
})
0 commit comments