library(testthat)
library(ShinyApp)
test_that("Correct data frame", {
test.data.frame.to.save = turnTimeSeriesToDataFrame(datasets::AirPassengers)
expect_true(is.data.frame(test.data.frame.to.save))
})
test_that("Correct time series - no arguments", {
expect_error(turnTimeSeriesToDataFrame())
})
test_that("Correct time series - character arguments", {
expect_error(turnTimeSeriesToDataFrame('test123'))
})
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.