diff --git a/tests/testthat/test-plot-coordmap.R b/tests/testthat/test-plot-coordmap.R index 94156221c4..db20f16a84 100644 --- a/tests/testthat/test-plot-coordmap.R +++ b/tests/testthat/test-plot-coordmap.R @@ -6,7 +6,9 @@ sortList <- function(x) { } # This will create print.ggplot in the current environment -print.ggplot <- custom_print.ggplot +# print.ggplot is for ggplot2 < 4.0.0 +# print.ggplot2::ggplot is for ggplot2 >= 4.0.0 +print.ggplot <- `print.ggplot2::ggplot` <- custom_print.ggplot test_that("ggplot coordmap", {