Skip to content

Commit

Permalink
try to ignore vdiffr test on CI
Browse files Browse the repository at this point in the history
  • Loading branch information
GabrielSlPires committed May 22, 2024
1 parent b6c66a2 commit 111eda5
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 14 deletions.
14 changes: 0 additions & 14 deletions tests/testthat.R
Original file line number Diff line number Diff line change
Expand Up @@ -11,17 +11,3 @@ library(ggdaynight)

test_check("ggdaynight")

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
}

15 changes: 15 additions & 0 deletions tests/testthat/test-geom_daynight.R
Original file line number Diff line number Diff line change
@@ -1,3 +1,18 @@
# Ignore vdiffr test on CI
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 for basic usage with default parameters
test_that("Basic usage with default parameters", {
skip_if(getRversion() < numeric_version("4.4"))
Expand Down

0 comments on commit 111eda5

Please sign in to comment.