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

shinytest2 with a shiny app created in the golem framework #15

Closed
mjfrigaard opened this issue Nov 6, 2023 · 1 comment
Closed

shinytest2 with a shiny app created in the golem framework #15

mjfrigaard opened this issue Nov 6, 2023 · 1 comment
Assignees
Labels
tests unit test, integration test, or system test section

Comments

@mjfrigaard
Copy link
Owner

An example of how to use shinytest2 with a shiny app created in the golem framework (I think it does not work out of the box since it needs an app.R file in the package directory?)

@mjfrigaard mjfrigaard self-assigned this Nov 6, 2023
@mjfrigaard mjfrigaard added the tests unit test, integration test, or system test section label Nov 6, 2023
@mjfrigaard
Copy link
Owner Author

It's possible to perform shinytest2 tests with golem apps, but it will produce the following warning message:

Warning message:
In shiny::loadSupport(app_dir, renv = renv, globalrenv = globalrenv) :
  Loading R/ subdirectory for Shiny application, but this directory appears to contain an R package. Sourcing files in R/ may cause unexpected behavior.

This is due to how shinytest2 loads the application in setup-shinytest2.R (see this issue for more details).

The golem chapter now covers the results from unit, integration, and system tests.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
tests unit test, integration test, or system test section
Projects
None yet
Development

No branches or pull requests

1 participant