context("FILE IMPORT TESTS")
test_that("is a file not a directory", {
dir <- getwd()
expect_error(import_from_file(dir))
})
test_that("file does not exists", {
file <- "does_not_exist.xlsx"
expect_error(import_from_file(file))
})
test_that("is not a supported file", {
file <- "vs3_model_invalid_file.txt"
expect_error(import_from_file(file))
})
test_that("stats import works for xlsx files", {
file <- "vs3_model_valid.xlsx"
expect_true(is.data.frame(import_from_file(file)))
})
test_that("stats import works for xls files", {
file <- "vs3_model_valid.xls"
expect_true(is.data.frame(import_from_file(file)))
})
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.