tests/testthat/test-geom-timeline.R

context("test-geom-timeline.R")

test_data <- tibble::tribble(
  ~DATE,                        ~COUNTRY,   ~LOCATION,  ~EQ_PRIMARY,
  lubridate::ymd("1858-04-23"), "Germany",  "Kiel",     1,
  lubridate::ymd("1879-03-14"), "Germany",  "Ulm",      2,
  lubridate::ymd("1942-01-08"), "England",  "Oxford",   3
)

test_that("geom_timeline", {
  vdiffr::expect_doppelganger("x aesthetic only",
    ggplot2::ggplot(test_data, ggplot2::aes(x = DATE)) + geom_timeline()
  )
})
niklaas/rcapstone documentation built on May 25, 2019, 10:41 p.m.