context("test_js_quote")
test_that("plaintext works", {
string <- "text here"
expect_match(jsQuote(string), "^['\"]text here['\"]$")
})
test_that("newline works", {
string <- "text\nhere"
expect_match(jsQuote(string), "^['\"]text\\\\nhere['\"]$")
})
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.