Closed maxheld83 closed 3 years ago
I would rather we mention to reinstall where appropriate, rather than using devtools::load_all()
.
While load_all()
works for foreground R process testing, shinytest
spawns a background R process that requires the packages to be installed
While
load_all()
works for foreground R process testing,shinytest
spawns a background R process that requires the packages to be installed
Though as long as shinytest spawns the background with the same working directory (package root) devtools::load_all()
should work in the background process, too, correct?
It will work locally, yes.
But it will not work when I install and test your package on my machine, or when I run revdepcheck
on your R package.
devtools::load_all()
should not exist within a package's R code. (GREAT for local development, though).
devtools::load_all()
should not exist within a package's R code. (GREAT for local development, though).
A yes of course 😬
this is a shot at https://github.com/rstudio/shinytest/issues/397.
Just placing
devtools::load_all()
in theapp.R
solves the problem for me, and brings shinytest in line with my normal testthat workflow, but I don't know enough about shinytest internals to be certain that this works broadly.The apps under
inst/
should also work because, as I recall,devtools::load_all()
shimssystem.file()
.