library(withr)
describe("is_testing()", {
it("returns TRUE if envvar is set", {
local_envvar(list(TESTTHAT = "true"))
expect_true(is_testing())
})
it("returns FALSE if envvar is not set", {
local_envvar(list(TESTTHAT = NA))
expect_false(is_testing())
})
})
describe("in_covr", {
it("returns TRUE if envvar is set", {
local_envvar(list(R_COVR = "true"))
expect_true(in_covr())
})
it("returns FALSE if envvar is not set", {
local_envvar(list(R_COVR = NA))
expect_false(in_covr())
})
})
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.