You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Address issues related to testing with shinytest2 the examples (#915)
# Pull Request
Attempts to fixinsightsengineering/coredev-tasks#536 on this
package.
1. system.file don't raise an error (but I need to check if it is empty
or it reports useful info).
2. When there is an error on a shiny session the test of the example
fails.
3. Stop using `load_all` inside test-examples.
4. Checks all examples due to upstream issues being fixed since last
year.
For testing 2 create a new file and add a new file and document to add
this example:
```
#' Example failing
#' @export
#' @examples
#' app <- init(
#' data = teal_data(
#' new_iris = transform(iris, id = seq_len(nrow(iris))),
#' new_mtcars = transform(mtcars, id = seq_len(nrow(mtcars)))
#' ),
#' modules = modules(
#' module(
#' "Iris Sepal.Length histogram",
#' server = function(input, output, session, data) {
#' stop("yada") # 🔍 this will fail the app
#' },
#' ui = function(id, ...) {
#' ns <- NS(id)
#' plotOutput(ns("hist"))
#' },
#' datanames = "new_iris"
#' )
#' )
#' )
#' if (interactive()) {
#' shinyApp(app$ui, app$server)
#' }
module_error <- function() {}
```
Then for all check with `R CMD check` or `devtools::test(filter =
"examples")` from plain R session.
0 commit comments