From 213f0d3a9394fd8cb70a9d0ad431dc89a96809e8 Mon Sep 17 00:00:00 2001 From: Barret Schloerke Date: Tue, 12 Jan 2021 13:29:18 -0500 Subject: [PATCH] Reduce promises version to 1.1.0 and safeguard visibility test (#3252) --- DESCRIPTION | 3 +-- tests/testthat/test-bind-cache.R | 3 +++ tests/testthat/test-hybrid-chain.R | 3 +++ 3 files changed, 7 insertions(+), 2 deletions(-) diff --git a/DESCRIPTION b/DESCRIPTION index 4ec15a1e2..1621ff9b6 100644 --- a/DESCRIPTION +++ b/DESCRIPTION @@ -85,7 +85,7 @@ Imports: R6 (>= 2.0), sourcetools, later (>= 1.0.0), - promises (>= 1.1.1.9001), + promises (>= 1.1.0), tools, crayon, rlang (>= 0.4.9), @@ -116,7 +116,6 @@ Suggests: sass Remotes: rstudio/htmltools, - rstudio/promises, rstudio/sass, rstudio/bslib, rstudio/shinytest, diff --git a/tests/testthat/test-bind-cache.R b/tests/testthat/test-bind-cache.R index 764a6f90f..da97e76db 100644 --- a/tests/testthat/test-bind-cache.R +++ b/tests/testthat/test-bind-cache.R @@ -923,6 +923,9 @@ test_that("bindCache visibility", { test_that("bindCache reactive visibility - async", { + # only test if promises handles visibility + skip_if_not_installed("promises", "1.1.1.9001") + cache <- cachem::cache_mem() k <- reactiveVal(0) res <- NULL diff --git a/tests/testthat/test-hybrid-chain.R b/tests/testthat/test-hybrid-chain.R index ffa4d02df..607e11bf6 100644 --- a/tests/testthat/test-hybrid-chain.R +++ b/tests/testthat/test-hybrid-chain.R @@ -27,6 +27,9 @@ test_that("hybrid_chain preserves visibility", { test_that("hybrid_chain preserves visibility - async", { + # only test if promises handles visibility + skip_if_not_installed("promises", "1.1.1.9001") + res <- NULL hybrid_chain( promise_resolve(1),