\n"
expect_equal(result, expected)
# Reset the knitr.in.progress option
options(knitr.in.progress = NULL)
})
# Test case 2: Default behavior outside Rmd
test_that("Default behavior outside Rmd", {
result <- button()
expected <- "\n::: {.callout-note collapse='true'}\n
## Description
\n\n"
expect_equal(result, expected)
})
# Test case 3: Custom text
test_that("Custom text", {
result <- button(text = "Custom Text")
expected <- "\n::: {.callout-note collapse='true'}\n
## Custom Text
\n\n"
expect_equal(result, expected)
})