Package with an initial set of functions added
NOTE: Not all tests have been written yet!
This commit is contained in:
13
tests/testthat/test-htmlRemoveAttributes.R
Normal file
13
tests/testthat/test-htmlRemoveAttributes.R
Normal file
@@ -0,0 +1,13 @@
|
||||
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)
|
||||
)
|
||||
})
|
||||
Reference in New Issue
Block a user