Skip to content

Commit

Permalink
Manually making expect_doppleganger alias
Browse files Browse the repository at this point in the history
  • Loading branch information
jtlandis committed Feb 26, 2024
1 parent 381ad27 commit 701d4c4
Showing 1 changed file with 14 additions and 1 deletion.
15 changes: 14 additions & 1 deletion tests/testthat.R
Original file line number Diff line number Diff line change
@@ -1,6 +1,19 @@
library(testthat)
library(vdiffr)
library(ggplot2)
library(ggside)

if ((nzchar(Sys.getenv("CI")) ||
!nzchar(Sys.getenv("NOT_CRAN"))) &&
identical(Sys.getenv("VDIFFR_RUN_TESTS"), 'false')) {
#if we are running tests remotely AND
# we are opting out of using vdiffr
# assigning a dummy function

expect_doppelganger <- function(...) {
testthat::skip("`VDIFFR_RUN_TESTS` set to false on this remote check")
}
} else {
expect_doppelganger <- vdiffr::expect_doppelganger
}

test_check("ggside")

0 comments on commit 701d4c4

Please sign in to comment.