test_that("add_prompt adds info as attributes of the element if not an image", { x <- shiny::actionButton("test", "test") y <- add_prompt(x, message = "foo") expect_equal( as.character(y), '' ) }) test_that("add_prompt embeds the element in a new div if element is an image", { x <- shiny::img(src = "https://placeimg.com/200/150/nature") y <- add_prompt(x, message = "foo") expect_equal( as.character(y), '