chunktest::init(use_crayon = FALSE)
```{testthat test1} test_that("one plus one is two", { expect_equal(1 + 1, 2) })
test_that("you can skip tests if needed", { skip("This tests hasn't been written yet") })
test_that("some tests have warnings", { expect_equal(log(-1), NaN) })
test_that("some more successes just to pad things out", { expect_true(TRUE) expect_false(FALSE) })
```{testthat} plus <- function(x, y) rep(1,length(x)) + rep(1, length(y)) test_that("one plus one is two", { expect_equal(plus(1, 1), 2) }) test_that("two plus two is four", { expect_equal(plus(2, 2), 4) })
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.