Unable to test `renderDT()` in a `MockShinySession`
cpsievert opened this issue · 0 comments
cpsievert commented
The following code generates an error when I'd expect it to print the JSON sent to the browser.
library(shiny)
library(DT)
session <- MockShinySession$new()
isolate({
outFunc <- renderDT({
head(mtcars)
})
outFunc(session, "name")
})
Error in shiny::snapshotPreprocessInput(paste0(name, "_state"), function(value) { :
snapshotPreprocessInput() needs a session object.