test_that(".get_module_output() deals with well-formatted input", {
results <- c(1, 2, 3, -2, 0, 0)
input_1 <- list(values = c(1, 1, 1, 1, 1), index_offset = 0)
input_2 <- list(values = c(1, 1, 1, 1, 1), index_offset = -1)
expect_identical(.get_module_output(results, input_1$index_offset), list(values = results, index_offset = 0))
expect_identical(.get_module_output(results, input_2$index_offset), list(values = results, index_offset = -1))
expect_identical(.get_module_output(results, input_2$index_offset, additional_offset = 3), list(values = results, index_offset = 2))
})
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.