Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

runTests() doesn't source app.R before running tests #2746

Open
alandipert opened this issue Jan 21, 2020 · 0 comments
Open

runTests() doesn't source app.R before running tests #2746

alandipert opened this issue Jan 21, 2020 · 0 comments

Comments

@alandipert
Copy link
Contributor

I noticed while working on rstudio/shinycoreci-apps#2 that shiny::runTests() doesn't source app.R before sourcing files in tests/.

It only sources files in R/ (if there are any), globals.R and server.R, depending on the value of shiny.autoload.r.

This is problematic if your app consists only of an app.R, but your app.R contains functions (or module functions) that you wish to test.

I think we should source app.R after any files in R/, but I'm open to suggestions about how we should handle the presence of app.R combined with the presence of server.R/globals.R. I figure at a minimum we should signal a warning.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant