If you have Node.js available on your machine,
you can write end-to-end tests using Cypress
and run them with rhino::test_e2e()
without any additional setup.
If you'd prefer to use the shinytest2
package instead, you will need to:
rhino::pkg_install(c("shinytest2", "shinyvalidate"))
.shinytest2::record_test()
or shinytest2::use_shinytest2_test()
as usual.shinytest2
,
which are unnecessary in Rhino:tests/testthat.R
),
used in R packages and executed by R CMD check
.tests/testthat/setup-shinytest2.R
),
used in traditional Shiny applications with global.R
and sources in the R
directory.The tests created by shinytest2
are treated as any other testthat
tests
and can be run with rhino::test_r()
.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.