test_that("class modifiers work", {
expect_true(
list() %>%
add_class("hello") %>%
inherits("hello")
)
expect_true(
list() %>%
add_class("hello") %>%
rmv_class("hello") %>%
{ !inherits(., "hello") }
)
})
test_that("drop_nulls work", {
expect_length(
list(NULL, "a", NULL, "b") %>%
drop_nulls(),
2L
)
})
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.