test_that("correct input format", {
what <- c("This is a character string")
say(what)
expect_type(what, "character")
expect_gt(length(what), 0)
})
test_that("output correct format", {
# test the output is of correct format
expect_length(say(), 0) #Returns something with a length of 0
expect_null(say()) #Returns null
expect_invisible(say()) #Returns invisibly
expect_message(say()) #Returns a message
})
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.