diff --git a/DESCRIPTION b/DESCRIPTION
index 68f3e7946..122fa6770 100644
--- a/DESCRIPTION
+++ b/DESCRIPTION
@@ -99,7 +99,7 @@ Suggests:
datasets,
DT,
Cairo (>= 1.5-5),
- testthat (>= 3.0.0),
+ testthat (>= 3.2.1),
knitr (>= 1.6),
markdown,
rmarkdown,
diff --git a/tests/testthat/test-bootstrap.r b/tests/testthat/test-bootstrap.r
index f39bb726c..c2e9b51db 100644
--- a/tests/testthat/test-bootstrap.r
+++ b/tests/testthat/test-bootstrap.r
@@ -21,10 +21,11 @@ test_that("Repeated names for selectInput and radioButtons choices", {
# Select input
x <- selectInput('id','label', choices = c(a='x1', a='x2', b='x3'), selectize = FALSE)
- expect_true(grepl(fixed = TRUE,
+ expect_match(
+ format(x),
'',
- format(x)
- ))
+ fixed = TRUE
+ )
# Radio buttons using choices
x <- radioButtons('id','label', choices = c(a='x1', a='x2', b='x3'))
@@ -248,10 +249,11 @@ test_that("selectInput selects items by default", {
))
# Nothing selected when choices=NULL
- expect_true(grepl(fixed = TRUE,
+ expect_match(
+ format(selectInput('x', NULL, NULL, selectize = FALSE)),
'',
- format(selectInput('x', NULL, NULL, selectize = FALSE))
- ))
+ fixed = TRUE
+ )
# None specified as selected. With multiple=TRUE, none selected by default.
expect_true(grepl(fixed = TRUE,
diff --git a/tests/testthat/test-busy-indication.R b/tests/testthat/test-busy-indication.R
index 4fdd90aee..1f36d92bf 100644
--- a/tests/testthat/test-busy-indication.R
+++ b/tests/testthat/test-busy-indication.R
@@ -48,7 +48,7 @@ test_that("busyIndicatorOptions()", {
test_that("Can provide svg file for busyIndicatorOptions(spinner_type)", {
- skip_if(.Platform$OS.type == "windows")
+ skip_on_os("windows")
tmpsvg <- tempfile(fileext = ".svg")
writeLines("", tmpsvg)
diff --git a/tests/testthat/test-input-select.R b/tests/testthat/test-input-select.R
index b41a2a207..d30c686f6 100644
--- a/tests/testthat/test-input-select.R
+++ b/tests/testthat/test-input-select.R
@@ -1,10 +1,10 @@
test_that("performance warning works", {
pattern <- "consider using server-side selectize"
- expect_warning(selectInput("x", "x", as.character(1:999)), NA)
- expect_warning(selectInput("x", "x", as.character(1:999), selectize = TRUE), NA)
- expect_warning(selectInput("x", "x", as.character(1:999), selectize = FALSE), NA)
- expect_warning(selectizeInput("x", "x", as.character(1:999)), NA)
+ expect_no_warning(selectInput("x", "x", as.character(1:999)))
+ expect_no_warning(selectInput("x", "x", as.character(1:999), selectize = TRUE))
+ expect_no_warning(selectInput("x", "x", as.character(1:999), selectize = FALSE))
+ expect_no_warning(selectizeInput("x", "x", as.character(1:999)))
expect_warning(selectInput("x", "x", as.character(1:1000)), pattern)
expect_warning(selectInput("x", "x", as.character(1:1000), selectize = TRUE), pattern)
@@ -17,9 +17,9 @@ test_that("performance warning works", {
session <- MockShinySession$new()
- expect_warning(updateSelectInput(session, "x", choices = as.character(1:999)), NA)
- expect_warning(updateSelectizeInput(session, "x", choices = as.character(1:999)), NA)
- expect_warning(updateSelectizeInput(session, "x", choices = as.character(1:999), server = FALSE), NA)
+ expect_no_warning(updateSelectInput(session, "x", choices = as.character(1:999)))
+ expect_no_warning(updateSelectizeInput(session, "x", choices = as.character(1:999)))
+ expect_no_warning(updateSelectizeInput(session, "x", choices = as.character(1:999), server = FALSE))
expect_warning(updateSelectInput(session, "x", choices = as.character(1:1000)), pattern)
expect_warning(updateSelectizeInput(session, "x", choices = as.character(1:1000)), pattern)
@@ -28,9 +28,9 @@ test_that("performance warning works", {
expect_warning(updateSelectizeInput(session, "x", choices = as.character(1:2000)), pattern)
expect_warning(updateSelectizeInput(session, "x", choices = as.character(1:2000), server = FALSE), pattern)
- expect_warning(updateSelectizeInput(session, "x", choices = as.character(1:999), server = TRUE), NA)
- expect_warning(updateSelectizeInput(session, "x", choices = as.character(1:1000), server = TRUE), NA)
- expect_warning(updateSelectizeInput(session, "x", choices = as.character(1:2000), server = TRUE), NA)
+ expect_no_warning(updateSelectizeInput(session, "x", choices = as.character(1:999), server = TRUE))
+ expect_no_warning(updateSelectizeInput(session, "x", choices = as.character(1:1000), server = TRUE))
+ expect_no_warning(updateSelectizeInput(session, "x", choices = as.character(1:2000), server = TRUE))
})
@@ -55,9 +55,9 @@ test_that("selectInput options are properly escaped", {
))
si_str <- as.character(si)
- expect_true(any(grepl("