From 779588a888296070a5bf4cf1d947df7e8685ea66 Mon Sep 17 00:00:00 2001 From: Indrajeet Patil Date: Tue, 19 Nov 2024 22:40:42 +0100 Subject: [PATCH] assume vdiffr is always available --- tests/testthat/test-plot.check_dag.R | 1 - tests/testthat/test-plot.compare_parameters.R | 2 +- tests/testthat/test-plot.p_direction.R | 1 - tests/testthat/test-plot.p_significance.R | 2 -- tests/testthat/test-plot.parameters_model.R | 5 +---- tests/testthat/test-plot.simulate_parameters.R | 2 +- 6 files changed, 3 insertions(+), 10 deletions(-) diff --git a/tests/testthat/test-plot.check_dag.R b/tests/testthat/test-plot.check_dag.R index 2c1a79f41..ec39f88b9 100644 --- a/tests/testthat/test-plot.check_dag.R +++ b/tests/testthat/test-plot.check_dag.R @@ -1,4 +1,3 @@ -skip_if_not_installed("vdiffr") skip_if_not_installed("ggdag") skip_if_not_installed("dagitty") diff --git a/tests/testthat/test-plot.compare_parameters.R b/tests/testthat/test-plot.compare_parameters.R index 586540b43..8824a41a0 100644 --- a/tests/testthat/test-plot.compare_parameters.R +++ b/tests/testthat/test-plot.compare_parameters.R @@ -16,7 +16,7 @@ test_that("`plot()` for compare_parameters", { cp <- parameters::compare_parameters(gmod_glmer, gmod_glmmTMB, effects = "random") expect_warning(plot(cp), "No data left") - skip_if_not_installed("vdiffr") + vdiffr::expect_doppelganger( title = "plot.compare_parameters works", fig = plot(cp, show_intercept = TRUE) diff --git a/tests/testthat/test-plot.p_direction.R b/tests/testthat/test-plot.p_direction.R index 45bddfcbf..1b6f7e58d 100644 --- a/tests/testthat/test-plot.p_direction.R +++ b/tests/testthat/test-plot.p_direction.R @@ -13,7 +13,6 @@ skip_if_not_installed("bayestestR", minimum_version = "0.14.1") skip_if_not_installed("parameters", minimum_version = "0.22.3") test_that("`plot.see_p_direction` works {parameters}", { - skip_if_not_installed("vdiffr") skip_if_not_installed("ggridges") data(qol_cancer, package = "parameters") diff --git a/tests/testthat/test-plot.p_significance.R b/tests/testthat/test-plot.p_significance.R index 0c02f5da1..1bab2babd 100644 --- a/tests/testthat/test-plot.p_significance.R +++ b/tests/testthat/test-plot.p_significance.R @@ -13,7 +13,6 @@ skip_if_not_installed("bayestestR", minimum_version = "0.14.1") skip_if_not_installed("parameters", minimum_version = "0.22.3") test_that("`plot.see_p_significance works for two thresholds", { - skip_if_not_installed("vdiffr") skip_if_not_installed("ggridges") set.seed(123) @@ -31,7 +30,6 @@ test_that("`plot.see_p_significance works for two thresholds", { }) test_that("`plot.see_p_significance works {parameters}}", { - skip_if_not_installed("vdiffr") skip_if_not_installed("ggridges") data(qol_cancer, package = "parameters") diff --git a/tests/testthat/test-plot.parameters_model.R b/tests/testthat/test-plot.parameters_model.R index e7e368065..96163d234 100644 --- a/tests/testthat/test-plot.parameters_model.R +++ b/tests/testthat/test-plot.parameters_model.R @@ -3,7 +3,7 @@ test_that("`plot.see_parameters_model()` works", { result <- parameters::model_parameters(m) expect_s3_class(plot(result), "gg") - skip_if_not_installed("vdiffr") + vdiffr::expect_doppelganger( title = "plot.model_parameters_1", fig = plot(result) @@ -15,7 +15,6 @@ test_that("`plot.see_parameters_model()` works", { }) test_that("`plot.see_parameters_model()` random parameters works", { - skip_if_not_installed("vdiffr") skip_if_not_installed("lme4") skip_if_not_installed("parameters") @@ -67,7 +66,6 @@ test_that("`plot.see_parameters_model()` random parameters works", { test_that("`plot.see_parameters_model()` random parameters works", { - skip_if_not_installed("vdiffr") skip_if_not_installed("lme4") skip_if_not_installed("parameters") data(sleepstudy, package = "lme4") @@ -87,7 +85,6 @@ test_that("`plot.see_parameters_model()` random parameters works", { test_that("`plot.see_parameters_model()` random parameters works", { - skip_if_not_installed("vdiffr") skip_if_not_installed("mgcv") skip_if_not_installed("parameters") diff --git a/tests/testthat/test-plot.simulate_parameters.R b/tests/testthat/test-plot.simulate_parameters.R index f292ffa54..5c547ede0 100644 --- a/tests/testthat/test-plot.simulate_parameters.R +++ b/tests/testthat/test-plot.simulate_parameters.R @@ -6,7 +6,7 @@ skip_on_cran() skip_if_offline() skip_if_not_installed("mclogit") skip_if_not_installed("parameters") -skip_if_not_installed("vdiffr") + test_that("`plot()` for simulate_parameters", { pict <- base::readRDS(url("https://slcladal.github.io/data/pict.rda", "rb"))