Closed matt-sd-watson closed 2 years ago
errors are caused by the change in working directory between devtools::test() and both devtools::check() and R CMD check. Saving the session input files as internal package sysdata allows all tests to complete while having the package load the package data for the session inputs.
I am currently implementing server-side testing using
testServer
with a shiny app wrapped in a function like so:testServer(my_app::app_func(), expr = {}
where
expr
has a number of specific tests for the behaviour of the app. The tests run properly usingdevtools::test()
but do not run withdevtools::check()
due to the following error:The traceback is linked to a CSV file that is read in for every shiny session that allows the app to perform calculations.
Is there a way to properly specify the top-level directory for the package for
testServer
so that the testing framework is able to find the files required for the server testing?