diff --git a/tests/testthat/test-lmap.R b/tests/testthat/test-lmap.R index 9997a14b..c03c8a56 100644 --- a/tests/testthat/test-lmap.R +++ b/tests/testthat/test-lmap.R @@ -37,6 +37,7 @@ test_that("lmap_at() only affects selected elements", { }) test_that("lmap_at can use tidyselect", { + skip_if_not_installed("tidyselect") local_options(lifecycle_verbosity = "quiet") x <- lmap_at(mtcars, vars(tidyselect::contains("vs")), ~ .x + 10) diff --git a/tests/testthat/test-modify.R b/tests/testthat/test-modify.R index 1e67edbb..f24c74f5 100644 --- a/tests/testthat/test-modify.R +++ b/tests/testthat/test-modify.R @@ -114,6 +114,7 @@ test_that("`.else` modifies false elements", { }) test_that("modify_at() can use tidyselect", { + skip_if_not_installed("tidyselect") local_options(lifecycle_verbosity = "quiet") df <- data.frame(x = 1, y = 3) diff --git a/tests/testthat/test-utils.R b/tests/testthat/test-utils.R index bb668d27..bfec07cd 100644 --- a/tests/testthat/test-utils.R +++ b/tests/testthat/test-utils.R @@ -35,6 +35,7 @@ test_that("validates its inputs", { }) test_that("tidyselect `at` is deprecated", { + skip_if_not_installed("tidyselect") expect_snapshot({ . <- where_at(data.frame(x = 1), vars("x"), user_env = globalenv()) }) @@ -98,6 +99,7 @@ test_that("can work with output of by", { }) test_that("can work with lubridate periods", { + skip_if_not_installed("lubridate") days <- lubridate::days(1:2) expect_equal(map(days, identity), list(lubridate::days(1), lubridate::days(2)))