test_that("defaultIf(is.null, x, default) returns default for x = NULL", {
expect_equal(defaultIf(is.null, NULL, 10), 10)
expect_equal(defaultIf(is.null, NULL, "abc"), "abc")
})
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.