Due to recent changes, running testApp() on a directory with a app.R/server.R file (which throws an error) now throws with an incorrect, and very confusing, error:
> shinytest::testApp()
Error: `appDir` doesn't contain 'app.R', 'server.R', or exactly one '.Rmd'
For example, suppose I have a ./app.R file that simply contains:
stop("boom")
With this fix, you'll now get the same error that you'd get if you were to do shiny::runApp()
> shinytest::testApp()
Error in value[[3L]](cond) : boom
(Builds on https://github.com/rstudio/shiny/pull/3229)
Due to recent changes, running
testApp()
on a directory with aapp.R
/server.R
file (which throws an error) now throws with an incorrect, and very confusing, error:For example, suppose I have a
./app.R
file that simply contains:With this fix, you'll now get the same error that you'd get if you were to do
shiny::runApp()