Open stla opened 1 year ago
Sorry, in fact app$get_value(output = "plot")
works fine. The error appears when calling app$get_value(export = plot_obj)
.
> app$get_value(export = "plot_obj")
{shinytest2} query failed (500)----------------------
URL: http://127.0.0.1:3372/session/ee5d1f45139583f822803a4f41015321/dataobj/shinytest?w=&nonce=eca19e590&&&export=plot_obj&format=rds&sortC=1
<html>
<head lang = "en">
<title>An error has occurred</title>
</head>
<body>
<h1>An error has occurred!</h1>
<p>n must be strictly positive</p>
</body>
</html>
I can reprex. Thank you!
Workaround for now...
exportTestValues(
dt = dt(),
plot_obj = tryCatch(plot_obj(), error = function(e) e)
)
I'll make a PR in rstudio/shiny
Hello,
As far as I know, putting
validate(need(......))
inside a reactive conductor is a valid practice. However that causes a problem with shinytest2: the test fails because of an error whenever one callsapp$get_value()
orapp$get$values()
.