tests/testthat/test-background.R

context("background()")

library(htmltools)

test_that("add classes", {
  div(.style %>% background("red")) %>%
    expect_s3_class("shiny.tag") %>%
    expect_html_class("cas-bg-red")
})

test_that("spliced return", {
  .style %>% background("red") %>%
    expect_s3_class("rlang_box_splice")
})

Try the cascadess package in your browser

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

cascadess documentation built on Jan. 13, 2021, 5:10 p.m.