library(testthat) library(AutoEDA) library(ggplot2) #========================================================== # theme_autoeda() #========================================================== test_that("theme_autoeda returns theme", { th <- theme_autoeda() expect_s3_class( th, "theme" ) }) test_that("theme_autoeda can be added to ggplot", { p <- ggplot( iris, aes( Sepal.Length, Petal.Length ) ) + geom_point() + theme_autoeda() expect_s3_class( p, "ggplot" ) }) test_that("theme_autoeda works with histogram", { p <- histogram_plot( iris, "Sepal.Length" ) expect_s3_class( p, "ggplot" ) })