context("Testuje konwerter dystansu")
test_that("czy dobre wartości", {
expect_equal(convert(1, "km", "cm"), 100000)
expect_equal(convert(1, "inch", "cm"), 2.54)
expect_equal(convert(c(1,2), "m", "cm"), c(100, 200))
})
test_that("czy dobre błędy", {
expect_error(convert("lalala", "m", "cm"))
expect_error(convert("lalala", "m", "gigabajty"))
})
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.