..Rcheck/tests/testthat/test-utils_additional_HTML.R

library(shiny)

sample_tag <- tags$p("I am a sample paragraph tag", tags$code("with code"), ".")

# centered

expect_identical(
  MetaShARK::centered(sample_tag),
  tags$div(sample_tag, style = "text-align: center")
)

# withRedStar

expect_identical(
  MetaShARK::withRedStar(sample_tag),
  tags$span(
    HTML(
      paste0(
        sample_tag,
        tags$span(
          style = "color:red", "*"
        )
      )
    )
  )
)

# unns 

expect_equal(
  unns("ns-test"),
  "test"
)
earnaud/MetaShARK-v2 documentation built on Sept. 21, 2022, 10:52 a.m.