You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When testing code happening with test_that() inside a shiny app using shiny::testServer() and an error happens inside shiny::observeEvent({...}) the error location is not reported in the stack trace generated by test_that(). It is only reported by the default handler output that is generated by shiny. In the reproducible example, the stack trace stops at setInputs() rather than following the functions that are called as a results of setInputs() being called.
The expected result would be that testthat and shiny report the same error source, the function "stop()" in the function x(), and give as file and line number test.R:6.
Example application or steps to reproduce the problem
When testing code happening with
test_that()
inside a shiny app usingshiny::testServer()
and an error happens insideshiny::observeEvent({...})
the error location is not reported in the stack trace generated bytest_that()
. It is only reported by the default handler output that is generated by shiny. In the reproducible example, the stack trace stops atsetInputs()
rather than following the functions that are called as a results ofsetInputs()
being called.The expected result would be that testthat and shiny report the same error source, the function "stop()" in the function
x()
, and give as file and line numbertest.R:6
.Example application or steps to reproduce the problem
Output:
System details
Browser Version: n/a
Output of
sessionInfo()
:The text was updated successfully, but these errors were encountered: