From d2deb7ca8bd3f9f8248c5e5c2fa670ad51b6d705 Mon Sep 17 00:00:00 2001 From: Teun van den Brand <49372158+teunbrand@users.noreply.github.com> Date: Fri, 31 Jan 2025 15:17:24 +0100 Subject: [PATCH] Compatibility ggplot2 3.6.0 (#431) --- tests/testthat/test_glyph.r | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/tests/testthat/test_glyph.r b/tests/testthat/test_glyph.r index 46fef130..5079110a 100644 --- a/tests/testthat/test_glyph.r +++ b/tests/testthat/test_glyph.r @@ -10,7 +10,11 @@ test_that("glyphs are rendered", { test_that("glyph labels are applied", { res <- bed_glyph(bed_merge(x, id = dplyr::n()), label = "id") - expect_equal(res$labels$label, "id") + if ("get_labs" %in% getNamespaceExports("ggplot2")) { + expect_equal(ggplot2::get_labs(res)$label, "id") + } else { + expect_equal(res$labels$label, "id") + } }) a <- tibble::tribble(