tests/testthat/test_geom_timeline.R

context("GEOM Timeline")

df_clean <- eq_clean_data()

obj_out <- df_clean %>% dplyr::filter(COUNTRY %in% c('USA', 'PERU')) %>%
        dplyr::filter(date > '2000-01-01') %>%
        ggplot2::ggplot() +
        geom_timeline(aes(x = date, y = COUNTRY, color = TOTAL_DEATHS,
                          size = EQ_PRIMARY))


test_that("Is GEOM Timeline function giving back ggplot object ?", {


        expect_s3_class(obj_out, 'ggplot')

})
Brunobt80/rPkgNOAADataset documentation built on May 20, 2019, 12:57 a.m.