Nothing
test_that("%except% logs errors and returns default value", {
local_test_logger(layout = layout_glue_generator("{ns} / {ans} / {topenv} / {fn} / {call}\n{level} {msg}"))
f <- function() {
FunDoesNotExist(1:10) %except% 1
}
expect_snapshot(out <- f())
expect_equal(out, 1)
})
test_that("%except% returns value when no error", {
expect_equal(5 %except% 1, 5)
})
Any scripts or data that you put into this service are public.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.