14 lines
396 B
R
14 lines
396 B
R
test_that("remove existing attribute", {
|
|
x <- shiny::icon("wrench")
|
|
y <- "<i class=\"fas fa-wrench\" role=\"presentation\"></i>"
|
|
expect_equal(as.character(htmlRemoveAttributes(x, "aria-label")), y)
|
|
})
|
|
|
|
test_that("remove non-existing attribute does not fail", {
|
|
x <- shiny::icon("wrench")
|
|
expect_equal(
|
|
as.character(htmlRemoveAttributes(x, "aria-title")),
|
|
as.character(x)
|
|
)
|
|
})
|