library(testthat) library(AutoEDA) #========================================================== # html_report() #========================================================== test_that("html_report runs", { report <- auto_eda(iris) expect_message( html_report(report) ) }) #========================================================== # pdf_report() #========================================================== test_that("pdf_report accepts AutoEDAReport", { report <- auto_eda(iris) expect_message( pdf_report(report) ) }) test_that("pdf_report rejects invalid report", { expect_error( pdf_report(iris) ) }) test_that("pdf_report rejects invalid filename", { report <- auto_eda(iris) expect_error( pdf_report( report, file = 123 ) ) }) test_that("pdf_report returns filename", { report <- auto_eda(iris) expect_equal( pdf_report(report), "AutoEDA_Report.pdf" ) }) #========================================================== # word_report() #========================================================== test_that("word_report accepts AutoEDAReport", { report <- auto_eda(iris) expect_message( word_report(report) ) })