test_that("camelCase() handles NAs", {
expect_true(is.na(camelCase(NA)))
})
test_that("camelCase() handles spaces", {
expect_equal(camelCase("begins with"), "beginsWith")
})
test_that("camelCase() handles Front Caps", {
expect_equal(camelCase("Begins with"), "beginsWith")
})
test_that("camelCase() handles punctuation", {
expect_equal(camelCase("begins_with/!"), "beginsWith")
})
test_that("camelCase() returns single words without lowercasing the whole word", {
expect_equal(camelCase("phonemeM"), "phonemeM")
})
test_that("camelCase() handles vectors", {
expect_equal(
camelCase(c("phonemeM", NA, 123, "hey There campse 12324YDfnD")),
c("phonemeM", NA, "123", "heyThereCampse12324ydfnd")
)
})
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.