test_that("toInlineString", {
expect_identical(
object = toInlineString(
x = c("aaa", "bbb"),
class = "var"
),
expected = "{.var aaa}, {.var bbb}"
)
expect_identical(
object = toInlineString(
x = c("aaa", "bbb", "ccc"),
n = 2L,
class = "var"
),
expected = "{.var aaa}, {.var bbb}..."
)
})
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.