test_that("asInteger works", {
expect_true(is.integer(asInteger(2.3)))
expect_error(asInteger("a"))
myvar <- "2"
expect_error(asInteger(myvar), "Argument myvar should be")
})
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.