test_that("check that .validate_fns works", {
env_curr <- environment()
fn1 <- function(x) x; fn2 <- function(x) y
expected_params <- list(fn1 = 'x', fn2 = 'y', fn3 = 'x')
expect_error(gamlsspipeline:::.validate_fns(env = env_curr, expected_params = expected_params)) # error
fn2 <- NULL
expect_true(gamlsspipeline:::.validate_fns(env = env_curr, expected_params = expected_params)) # no error given if fn is NULL
})
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.