tests/testthat/test-check.R

test_that("switch is stable", {
    expect_snapshot(cc(inline_switch("switch_id", value = FALSE,
        on = shiny::span("On", class = "text-success"),
        off = shiny::span("Off", class = "text-danger"),
        meaning = "On/off switch")))
})

Try the inshiny package in your browser

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

inshiny documentation built on Feb. 14, 2026, 5:06 p.m.