tests/testthat/test-exported-values.R

context("Exported values")

app <- ShinyDriver$new(test_path("apps/test-exports/"))

test_that("Exported values", {
  x <- app$getAllValues()
  expect_identical(x$export$x, 1)
  expect_identical(x$export$y, 2)

  app$setInputs(inc = "click")
  app$setInputs(inc = "click")

  x <- app$getAllValues()
  expect_identical(x$export$x, 3)
  expect_identical(x$export$y, 4)
})
MangoTheCat/shinytest documentation built on Feb. 13, 2019, 3:31 p.m.