test_that("async_reflect", {
badfun <- async(function() stop("oh no!"))
safefun <- async_reflect(badfun)
do <- async(function() {
when_all(safefun(), safefun(), safefun())$
then(function(result) {
for (i in 1:3) {
expect_s3_class(result[[i]]$error, "error")
expect_null(result[[i]]$value)
}
})
})
synchronise(do())
})
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.