tests/testthat/helper-fill.R

tag_simple <- function(...) {
  htmltools::div(class = "test", id = "test", ...)
}

tag_nested <- function(...) {
  htmltools::withTags(
    div(
      div(class = "inner"),
      div(
        class = "nested",
        div(class = "inner deep")
      ),
      div(class = "inner"),
      ...
    )
  )
}

expect_equal_html <- function(actual, expected, ...) {
  expect_equal(
    format(actual),
    format(expected),
    ...
  )
}

Try the bslib package in your browser

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

bslib documentation built on May 29, 2024, 6:31 a.m.