test_that("enum() works", {
v <- c(1L ,2L , 3L)
venum <- enum(v)
vattr <- attributes(venum)
expect_identical(venum, v, ignore_attr = TRUE)
expect_identical(vattr$cli_style$vec_sep, ", ")
expect_identical(vattr$cli_style$vec_last, " or ")
})
cli::test_that_cli("enum() can be rendered with a ui function", {
expect_snapshot(ui_todo("{enum(c(1L, 2L, 3L))}"))
})
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.