tests/testthat/apps/dir-profile/app.R

library(shiny)

txt_val <- get0("shinytest2_profile_value", ifnotfound = "Not found! 😔😭")

ui <- fluidPage(
  "This app must be run in a clean R session that is started in the same directory as the app.R file.",
  textOutput("txt"),
)
server <- function(input, output, session) {
  output$txt <- renderText(txt_val)
}

shinyApp(ui, server)
rstudio/shinytest2 documentation built on March 29, 2025, 10:58 p.m.