tests/testthat/test_eq_map.R

context("Leaflet Map Checking")

df_clean <- eq_clean_data()
obj_out <- df_clean %>%
                dplyr::filter(COUNTRY == 'JAPAN') %>%
                dplyr::filter(lubridate::year(date) >= 2000)



test_that('Is the MAP correct Object ?', {

        map <- eq_map(obj_out, annot_col = 'date')


        expect_s3_class(map, 'leaflet')
        expect_s3_class(map, 'htmlwidget')
})
Brunobt80/rPkgNOAADataset documentation built on May 20, 2019, 12:57 a.m.