Skip to content

Commit 16882da

Browse files
committed
Remove workarounds
1 parent 28ce726 commit 16882da

File tree

1 file changed

+0
-16
lines changed

1 file changed

+0
-16
lines changed

tests/testthat/test-examples.R

Lines changed: 0 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -36,10 +36,6 @@ with_mocked_app_bindings <- function(code) {
3636
# workaround of https://github.com/rstudio/shinytest2/issues/381
3737
# change to `print(shiny__shinyApp(...))` and remove allow warning once fixed
3838
mocked_shinyApp <- function(ui, server, ...) { # nolint object_linter.
39-
functionBody(server) <- bquote({
40-
.hint_to_load_package <- add_facet_labels # Hint to shinytest2 when looking for packages in globals
41-
.(functionBody(server))
42-
})
4339
mocked_runApp(do.call(shiny__shinyApp, append(x = list(ui = ui, server = server), list(...))))
4440
}
4541

@@ -135,13 +131,6 @@ with_mocked_app_bindings <- function(code) {
135131
)
136132
}
137133

138-
strict_exceptions <- c(
139-
# https://github.com/r-lib/gtable/pull/94
140-
"tm_outliers.Rd",
141-
"tm_g_response.Rd",
142-
"tm_a_pca.Rd"
143-
)
144-
145134
discard_validation_regex <- list(
146135
"tm_file_viewer.Rd" = "Please select a file\\.",
147136
"tm_g_distribution.Rd" = "Please select a test"
@@ -155,11 +144,6 @@ for (i in rd_files()) {
155144
testthat::skip("chromium")
156145
skip_if_too_deep(5)
157146
testthat::skip_if_not_installed("pkgload")
158-
if (basename(i) %in% strict_exceptions) {
159-
op <- options()
160-
withr::local_options(opts_partial_match_old)
161-
withr::defer(options(op))
162-
}
163147
# Allow for specific validation errors for individual examples
164148
withr::local_options(
165149
list(

0 commit comments

Comments
 (0)