tests/testthat/test-js.R

test_that("active_js", {
  expect_s3_class(activate_js(), "shiny.tag")
})

test_that("invoke_js", {
  expect_error(invoke_js())
  expect_equal(
    invoke_js(
      "clickon",
      session = shiny::MockShinySession$new()
    ),
    list()
  )
})

Try the golem package in your browser

Any scripts or data that you put into this service are public.

golem documentation built on Sept. 11, 2024, 7:54 p.m.