test_that("bcat_plt_ts returns ggplot", { p <- bcat_plt_ts(ggplot2::economics, x = date, y = unemploy) expect_true(inherits(p, "ggplot")) }) test_that("bcat_plt_ts works with recession_bars", { rec <- data.frame( start = as.Date(c("2001-03-01", "2007-12-01")), end = as.Date(c("2001-11-01", "2009-06-01")) ) p <- bcat_plt_ts(ggplot2::economics, x = date, y = unemploy, recession_bars = rec) expect_true(inherits(p, "ggplot")) })