rstudio / shinytest2

https://rstudio.github.io/shinytest2/
Other
104 stars 16 forks source link

Do not use app object when testing a package #313

Open schloerke opened 1 year ago

schloerke commented 1 year ago

From https://github.com/rstudio/shinytest2/pull/307#issuecomment-1379392810

Am I correct that the main three cases we care about are:

  1. Writing tests for a nontrivial app that is in an app.R
  2. Writing tests for a nontrivial app that is using golem/rhino(?)
  3. Writing tests for trivial apps that exercise some feature or component that is not specific to a single app

The kind of cross-process de/serialization that this PR is fixing, totally makes sense to me for case 3. It makes me a lot less comfortable if people are relying on it for case 2. I'd love to see us make a formal recommendation for using shinytest2 with golem/rhino that doesn't involve serializing any code objects.

schloerke commented 1 year ago

This may go away if we can use testthat file loading