shiny::runApp()
Loading required package: shiny
Warning in loadSupport(appDir, renv = sharedEnv, globalrenv = NULL) :
Loading R/ subdirectory for Shiny application, but this directory appears to contain an R package. Sourcing files in R/ may cause unexpected behavior.
Error in isModuleServer(app) : object 'server' not found
Its not clear that you ran the app script to create the app object in the environment so it would be present when you ran testServer. If you didnt then you should, if you did, then im at my limit and cant help
Where module.R contains the moduleUI and moduleServer code.
Then testServer tells me: Error in isModuleServer(app)`: object 'moduleServer' not found
Backtrace:
shiny::testServer(...)
shiny:::isModuleServer(app)`
I think something is wrong with my file structure but I cannot be certain. I followed the instructions how Hadley says in Chapter 21 of Mastering Shiny. We can also usethis::use_test() in our module to generate the file needed that has the tests.